({{, (RefLink[CharacterEncoding, paclet:ref/CharacterEncoding])
is an option for input and output functions which specifies what raw character encoding should be used. }})

OpenersNotesSection(Spacer1)Details

The typical default is CharacterEncoding:>(RefLink[$CharacterEncoding, paclet:ref/$CharacterEncoding]).

The possible settings for (RefLink[CharacterEncoding, paclet:ref/CharacterEncoding]) are the same as for (RefLink[$CharacterEncoding, paclet:ref/$CharacterEncoding]).

(RefLink[$CharacterEncodings, paclet:ref/$CharacterEncodings]) gives a list of all installed character encodings.

OpenersPrimaryExamplesSection(Spacer1)Examples  (3)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Specify the character encoding used by (RefLink[ToString, paclet:ref/ToString]):

ToString["⊕",CharacterEncoding-> "ASCII"]

ToString["⊕",CharacterEncoding-> "UTF8"]

Write a string to a file:

file=CreateTemporary[];

Export[file,"α=45°","Text",CharacterEncoding->"UTF8"]

Specify the character encoding to use by (RefLink[Import, paclet:ref/Import]):

Import[file,"Text", CharacterEncoding -> "UTF8"]

OpenersExampleSection1(Spacer1)Applications  (1)

Find the full name of a character if there is one:

fullname[c_String]:=StringReplace[ToString[c,InputForm,CharacterEncoding->"ASCII"],"\"\\["~~a__~~"]\"":>a]

Full names of a few characters:

fullname/@{"⊕","🐺","∇",":>","⌘","μ","∂"}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[$CharacterEncodings, paclet:ref/$CharacterEncodings])  ▪  (RefLink[$CharacterEncoding, paclet:ref/$CharacterEncoding])  ▪  (RefLink[ToCharacterCode, paclet:ref/ToCharacterCode])  ▪  (RefLink[FromCharacterCode, paclet:ref/FromCharacterCode])  ▪  (RefLink[StringReplace, paclet:ref/StringReplace])  ▪  (RefLink[$SystemCharacterEncoding, paclet:ref/$SystemCharacterEncoding])  ▪  (RefLink[ShowSpecialCharacters, paclet:ref/ShowSpecialCharacters])  ▪  (RefLink[URLEncode, paclet:ref/URLEncode])  ▪  (RefLink[HTTPResponse, paclet:ref/HTTPResponse])  ▪  (RefLink[ByteArray, paclet:ref/ByteArray])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Raw Character Encodings, paclet:tutorial/RawCharacterEncodings])}, {▪(RefLinkPlain[Files and Streams, paclet:tutorial/FilesAndStreams])}, {▪(RefLinkPlain[Streams and Low-Level Input and Output, paclet:tutorial/StreamsAndLowLevelInputAndOutput])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Character Operations, paclet:guide/CharacterOperations])}, {▪(RefLinkPlain[International Character Sets, paclet:guide/InternationalCharacterSets])}, {▪(RefLinkPlain[Text Manipulation, paclet:guide/ProcessingTextualData])}, {▪(RefLinkPlain[Low-Level File Operations, paclet:guide/LowLevelFileOperations])}, {▪(RefLinkPlain[Text Normalization, paclet:guide/TextNormalization])}, {▪(RefLinkPlain[Font Options, paclet:guide/FontOptions])}})}})