MATHEMATICA TUTORIAL

# Special Characters

In addition to the ordinary characters that appear on a standard keyboard, you can include in Mathematica strings any of the special characters that are supported by Mathematica.

Here is a string containing special characters.
 Out[1]=
You can manipulate this string just as you would any other.
 Out[2]=
Here is the list of the characters in the string.
 Out[3]=

In a Mathematica notebook, a special character such as can always be displayed directly. But if you use a text-based interface, then typically the only characters that can readily be displayed are the ones that appear on your keyboard.

As a result, what Mathematica does in such situations is to try to approximate special characters by similar-looking sequences of ordinary characters. And when this is not practical, Mathematica just gives the full name of the special character.

In a Mathematica notebook using StandardForm, special characters can be displayed directly.
 Out[4]=
In OutputForm, however, the special characters are approximated when possible by sequences of ordinary ones.
 Out[5]//OutputForm=

Mathematica always uses full names for special characters in InputForm. This means that when special characters are written out to files or external programs, they are by default represented purely as sequences of ordinary characters.

This uniform representation is crucial in allowing special characters in Mathematica to be used in a way that does not depend on the details of particular computer systems.

In InputForm the full names of all special characters are always written out explicitly.
 Out[6]//InputForm=
 a a literal character \[Name] a character specified using its full name a to be included in a string a to be included in a string

Ways to enter characters in a string.

You have to use to "escape" any or characters in strings that you enter.
 Out[7]=
produces a literal rather than forming part of the specification of .
 Out[8]=
This breaks the string into a list of individual characters.
 Out[9]=
This creates a list of the characters in the full name of .
 Out[10]=
And this produces a string consisting of an actual from its full name.
 Out[11]=

## Tutorial CollectionTutorial Collection

New to Mathematica? Find your learning path »
Have a question? Ask support »