char_set
Entity: predicate

Usage:
char_set(Char_Set)

Gets and sets the default char set. All functions and predicates which work with strings use the default char set. For example, the predicate write assumes that the char set of the string is the default char set. If this is not the case the result of write can be wrong.

If Char_Set is variable then it gets the default chat set (actually gets its number which can be converted in the char set's name by the function char_set_name)

If Char_Set is the number of existing char set this predicate sets the default chat set to the one which has this number. Look at char sets table in order to see the numbers of all available char sets.
 

Example:

?-
  char_set(0),
  char_set(X),
  write(char_set_name(X, l)).
 

See also:
char_set_name
char sets table
convert_charset
convert_UTF8_to_local

Look at the example:
char_sets.spj (in folder Examples)