$CharacterEncoding

$CharacterEncoding

specifies the default raw character encoding to use for input and output functions.

Details

  • 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 :nnnn.
  • $CharacterEncodings gives a list of all installed character encodings.
  • Typical examples include:
  • "AdobeStandard"Adobe standard PostScript font encoding
    "ASCII"full ASCII, with control characters
    "EUC"extended Unix code for Japanese
    "ISOLatin1"ISO 88591 standard
    "ISOLatin2"ISO 88592 standard
    "ISOLatin3"ISO 88593 standard
    "ISOLatin4"ISO 88594 standard
    "ISOLatinCyrillic"ISO 88595 standard
    "MacintoshRoman"Macintosh roman font encoding
    "PrintableASCII"printable ASCII
    "ShiftJIS"shiftJIS encoding of JIS X 02081990 and extensions
    "Symbol"symbol font encoding
    "UTF8"Unicode transformation format
    "WindowsANSI"Windows standard font encoding
    "ZapfDingbats"Zapf dingbats font encoding
  • With $CharacterEncoding="encoding" characters that are included in the encoding can be input in their raw 8, 16 or 21-bit form, and will be output in this form.
  • Unencodable characters can be input and will be output in standard [Name] and :nnnn form.
  • When using a textbased interface, resetting the value of $CharacterEncoding has an immediate effect on standard input and output in a Wolfram System session.
  • When using the notebook front end, raw character encodings are normally handled automatically based on your operating system and locale. Only full Unicode is ever sent through the WSTP connection to the kernel.
  • $CharacterEncoding affects the input and output of all characters, including those in symbol names and comments.
  • $CharacterEncoding also affects characters that appear in Text primitives within graphics.

Examples

open allclose all

Basic Examples  (1)

The default raw character encoding:

Properties & Relations  (1)

Use $SystemCharacterEncoding to determine the default value of $CharacterEncoding:

Wolfram Research (1996), $CharacterEncoding, Wolfram Language function, https://reference.wolfram.com/language/ref/$CharacterEncoding.html (updated 2007).

Text

Wolfram Research (1996), $CharacterEncoding, Wolfram Language function, https://reference.wolfram.com/language/ref/$CharacterEncoding.html (updated 2007).

CMS

Wolfram Language. 1996. "$CharacterEncoding." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/$CharacterEncoding.html.

APA

Wolfram Language. (1996). $CharacterEncoding. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$CharacterEncoding.html

BibTeX

@misc{reference.wolfram_2024_$characterencoding, author="Wolfram Research", title="{$CharacterEncoding}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/$CharacterEncoding.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_$characterencoding, organization={Wolfram Research}, title={$CharacterEncoding}, year={2007}, url={https://reference.wolfram.com/language/ref/$CharacterEncoding.html}, note=[Accessed: 22-December-2024 ]}