WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

FromCharacterCode [n]

gives a string consisting of the character with integer code n.

FromCharacterCode [{n1,n2,}]

gives a string consisting of the sequence of characters with codes ni.

FromCharacterCode [{{n11,n12,},{n21,},}]

gives a list of strings.

FromCharacterCode [codes,"encoding"]

uses the specified character encoding.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Applications  
Properties & Relations  
See Also
Tech Notes
Related Guides
Related Links
History
Cite this Page

FromCharacterCode [n]

gives a string consisting of the character with integer code n.

FromCharacterCode [{n1,n2,}]

gives a string consisting of the sequence of characters with codes ni.

FromCharacterCode [{{n11,n12,},{n21,},}]

gives a list of strings.

FromCharacterCode [codes,"encoding"]

uses the specified character encoding.

Details

  • The integer n must lie between 0 and 1114111, as returned by ToCharacterCode .
  • FromCharacterCode ["string"] is equivalent to FromCharacterCode ["string","Unicode"], which converts integer code points in the Unicode standard to the corresponding character.
  • For n between 0 and 127, FromCharacterCode returns ASCII characters.
  • For n between 129 and 255, it returns ISO Latin1 characters.
  • For other n, it returns characters specified by the standard Wolfram Language encoding based on Unicode.
  • FullForm [FromCharacterCode[n]] gives the full name assigned to a special character with character code n.
  • Whether a particular character generated by FromCharacterCode can be rendered on your output device will depend on what fonts and drivers you are using.
  • Encodings supported in FromCharacterCode [,"encoding"] include the values in $CharacterEncodings in addition to "Unicode".

Examples

open all close all

Basic Examples  (2)

Give a string consisting of the sequence of characters with codes 97, 98, and 99:

Obtain character codes:

FromCharacterCode reconstructs the original string:

Scope  (4)

Create a string consisting of a character:

A string consisting of several characters:

A list of strings:

Use a character encoding:

Use a variable-length character encoding:

All printable ASCII characters:

Some ISO Latin-1 letters:

Some characters in the private use area:

Some emojis:

Applications  (1)

All the names of special characters that begin with "N":

Properties & Relations  (5)

The default encoding is "Unicode":

FromCharacterCode is the inverse of ToCharacterCode :

This is also true for lists of strings:

FromCharacterCode reproduces the list of strings:

Use FullForm to get the full name assigned to a special character:

The allowed values of the second argument are given by $CharacterEncodings :

Some character codes combine when forming characters:

Tech Notes

History

Introduced in 1991 (2.0) | Updated in 1996 (3.0) 1999 (4.0) 2000 (4.1) 2002 (4.2) 2007 (6.0) 2019 (12.0)

Wolfram Research (1991), FromCharacterCode, Wolfram Language function, https://reference.wolfram.com/language/ref/FromCharacterCode.html (updated 2019).

Text

Wolfram Research (1991), FromCharacterCode, Wolfram Language function, https://reference.wolfram.com/language/ref/FromCharacterCode.html (updated 2019).

CMS

Wolfram Language. 1991. "FromCharacterCode." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/FromCharacterCode.html.

APA

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

BibTeX

@misc{reference.wolfram_2025_fromcharactercode, author="Wolfram Research", title="{FromCharacterCode}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/FromCharacterCode.html}", note=[Accessed: 17-November-2025]}

BibLaTeX

@online{reference.wolfram_2025_fromcharactercode, organization={Wolfram Research}, title={FromCharacterCode}, year={2019}, url={https://reference.wolfram.com/language/ref/FromCharacterCode.html}, note=[Accessed: 17-November-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /