Try now in the
Open Cloud »
(no sign-in required)

Character Space

Find out what Unicode characters there are and how theyre encoded.

Run the code to get the character codes of the characters in a text string. Try different strings:

SHOW/HIDE DETAILS

Characters are represented on computers by numeric character codes. There are various ways to assign codes to characters; the Wolfram Language uses the Unicode standard.

In Unicode, the character A is represented by 65:

In[1]:=
X
Out[1]=

Get the character codes of a longer text string:

In[2]:=
X
Out[2]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Turn character codes into characters. Try different character codes:

SHOW/HIDE DETAILS

Turn character codes into characters with FromCharacterCode.

In Unicode, 97 represents the lowercase character a:

In[1]:=
X
Out[1]=

Get the character string that corresponds to a list of character codes:

In[2]:=
X
Out[2]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Get a range of characters. Try different ranges:

SHOW/HIDE DETAILS

Character sets like alphabets or digits occupy ranges of adjacent character codes in Unicode.

The characters from 97 to 122 are the Latin alphabet:

In[1]:=
X
Out[1]=

The characters from 48 to 57 are the digits:

In[2]:=
X
Out[2]=

The Greek alphabet occupies character codes 945 to 969:

In[3]:=
X
Out[3]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Display a character and its code. Try character codes other than 8364:

Note: replace both instances of 8364 to change the character code.

SHOW/HIDE DETAILS

The euro symbol is Unicode 8364:

In[1]:=
X
Out[1]=

Use Style to display the character in a 100-point font (a point is a printers measure equal to 1/72 inch):

In[2]:=
X
Out[2]=

Label the character with its character code:

In[3]:=
X
Out[3]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Make it interactive. Drag the slider to explore Unicode characters:

Hint: press (or ) for fine control while dragging the slider; press + (or +) for even finer control.

SHOW/HIDE DETAILS

This displays a large euro symbol and its character code:

In[1]:=
X
Out[1]=

Make an interactive interface that lets you choose the character that is displayed using Manipulate.

Wrap the Labeled expression with Manipulate, replace the fixed character code 8364 with the variable n, and specify that n ranges from 0 to 65535 in steps of 1. Drag the slider to see different characters and their codes:

In[2]:=
X
Out[2]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Explore ranges of characters:

SHOW/HIDE DETAILS

Replace n with a range, add a control for dn, and let the range go from n to n+dn. The upper limit 65535 of n must be reduced to 65435 to leave room for a dn value of 100:

In[1]:=
X

HIDE DETAILS
In[1]:=
X
Out[1]=

Share ItMake an interactive website for exploring the Unicode character space:

SHOW/HIDE DETAILS

Deploy the Manipulate to the Wolfram Cloud where anyone with a browser can use it:

In[1]:=
X
Out[1]=

Click the link in the output to visit the site.

Share the link by right-clicking it and choosing Copy Address. Paste the link into an email, tweet, or other message.

HIDE DETAILS
In[1]:=
X
Out[1]=