Did you know ... Search Documentation:
Predicate current_encoding/1
 current_encoding(?Name) is nondet[private]
True if Name is the name of a supported encoding. See encoding option of e.g., open/4.