This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
[an error occurred while processing this directive] $CharacterEncoding

  • $CharacterEncoding specifies the default raw character encoding to use for input and output functions.
  • The default setting for $CharacterEncoding is $SystemCharacterEncoding.
  • The setting $CharacterEncoding = None takes all special characters to be represented externally by printable ASCII sequences such as \[ Name ] and \: xxxx.
  • Possible other settings are:
  • With $CharacterEncoding = " encoding " characters that are included in the encoding can be input in their raw 8- or 16-bit form, and will be output in this form.
  • Unencoded characters can be input and will be output in standard \[ Name ] or \: xxxx form.
  • When using a text-based interface, resetting the value of $CharacterEncoding has an immediate effect on standard input and output in a Mathematica session.
  • When using the notebook front end, raw character encodings are normally handled automatically based on the fonts you use. Only raw 16-bit Unicode is ever sent through the MathLink connection to the kernel.
  • $CharacterEncoding can be set to a list of the form class , , " " , , " " , ... . The class defines the general form of encoding; the give character codes for specific characters . Possible settings for class include:
  • $CharacterEncoding affects the input and output of all characters, including those in symbol names and comments.
  • $CharacterEncoding also affects characters that appear in Text graphics primitives.
  • See the Mathematica book: Section 2.7.8.
  • See also: CharacterEncoding, FromCharacterCode, ToCharacterCode, $SystemCharacterEncoding.