Wolfram: Source Code Encoding and Unicode
Wolfram Source Code is ASCII Only
Wolfram source code and the notebook, is saved in ASCII character set only.
Wolfram Supports Unicode Characters
Wolfram supports Unicode characters. e.g. → α 水 😃
Syntax of Unicode Characters
Unicode characters are represented in source code in one of the following syntax.
\[Name]
-
Named character syntax. e.g.
\[Alpha]
forα
(U+3B1: GREEK SMALL LETTER ALPHA)there are about 1k named characters.
\:hhhh
-
Lowercase 4 hexadecimal digits character syntax. e.g.
\:6c34
for 水 (U+6C34: CJK IDEOGRAPH-6C34) \|hhhhhh
-
Lowercase 6 hexadecimal digits character syntax. e.g.
\|01f603
for😃
(U+1F603: SMILING FACE WITH OPEN MOUTH)
What is Named Character
- Named character is a set of characters that have the syntax
\[Name]
- Named characters is a special character set designed by Wolfram, to represent math symbols or other icons.
- As of 2025-03-01, there are 1061 named chars.
- Most of the name characters are also in Unicode, but not all.
- When you type a named char syntax, it is displayed as the character glyph. e.g.
\[Alpha]
is shown as α.
Glyph | Syntax |
---|---|
é | \[EAcute] |
É | \[CapitalEAcute] |
α | \[Alpha] |
Δ | \[CapitalDelta] |
⊕ | \[CirclePlus] |
∈ | \[Element] |
⇔ | \[Equivalent] |
ℝ | \[DoubleStruckCapitalR] |
Some Named Characters Are Not in Unicode
Some of the named chars are not in Unicode. For example:



Some Unicode Math Symbols Are Not in Named Chars
- Chinese chars, Arabic alphabets etc, are not part of Wolfram named chars.
- Many math or tech symbols in Unicode are not in Wolfram named characters.
(Wolfram has only over 1k named characters. Unicode has over 140k characters.)
Example of Unicode Characters that Are Not in Wolfram Named Characters
- ⫷ (U+2AF7: TRIPLE NESTED LESS-THAN)
- ⫸ (U+2AF8: TRIPLE NESTED GREATER-THAN)
- 🤡 (U+1F921: CLOWN FACE)
- 水 (U+6C34: CJK IDEOGRAPH-6C34)
Which Unicode Character Are Mapped to Wolfram Named Character
when you paste in unicode text to Wolfram Notebook , some characters are mapped to Wolfram named characters.
- π (U+3C0: GREEK SMALL LETTER PI) maps to
\[Pi]
However, some unicode char such as ℝ
(U+211D: DOUBLE-STRUCK CAPITAL R)
does not map to the similar named char
\[DoubleStruckCapitalR]
Am not aware of a document that list all the named characters and the unicode they map to.
Interpretation of Unicode Characters
When you paste in a unicode character, how does Wolfram Language interpret it?
If Not Mapped to a Named Character
If the character does not map to one of the named character, it is treated like any letter, such as a b c. You can use it in variable name or function name. For example:
Table[♥ , {♥, 1, 5}] (* {1, 2, 3, 4, 5} *)
Type of Named Chars: Letter or Letter-Like Forms, vs Operator
A named character is one of two types:
- letter or letter-like forms
- operator
Each character in these class may or may not have builtin meaning.
Here's a tree illustration:
- named char
- letter or letter-like
- has builtin meaning (e.g. π ° ∞)
- no builtin meaning. (e.g. α)
- operator
- has builtin meaning (e.g. ≥ √ ∑ ∫)
- no builtin meaning. (e.g. ± ⊕)
- letter or letter-like
- not named char (e.g. 🤡 💯)
Letter and Letter-Like-Form, vs Operator
If it's letter or letter-like forms, either it has a builtin meaning, e.g.
° same as Degree
,
π same as Pi
,
∞ same as Infinity
, or it is treated as any letter, such as
λ.
It is treated the same as any of a, b, c etc. You can use it as part of variable/function name.
If it's a operator, either it has a builtin meaning, such as √ ≥ ∑ ∫ Or it does not have builtin meaning, such as ⊕ .
Operator Characters
xtodoOperator characters have builtin syntactic meaning, i.e. unary or binary operator, and operator precedence.
A named character many have special meaning in Wolfram Language.
For example, π \[Pi]
is automatically considered identical to the built-in symbol Pi
, which means the mathematical constant.
(So, if you type \[Pi]
or \:03c0
, they are displayed as π
with meaning of Pi
.).
Here's some examples of special meaning named chars.
Glyph | Wolfram syntax | Unicode name | Unicode hexadecimal | Default Interpretation |
---|---|---|---|---|
π | \[Pi] | GREEK SMALL LETTER PI | U+3C0 | Pi |
∞ | \[Infinity] | INFINITY | U+221E | Infinity |
° | \[Degree] | DEGREE SIGN | U+B0 | Degree |
Glyph | Wolfram syntax | Unicode name | Unicode hexadecimal | Default Interpretation |
---|---|---|---|---|
√ | \[Sqrt] | SQUARE ROOT | U+221A | operator for Sqrt |
≥ | \[GreaterEqual] | GREATER-THAN OR EQUAL TO | U+2265 | operator for GreaterEqual |
⋂ | \[Intersection] | N-ARY INTERSECTION | U+22C2 | operator for Intersection |
∑ | \[Sum] | N-ARY SUMMATION | U+2211 | part of operator for Sum |
∫ | \[Integral] | INTEGRAL | U+222B | part of operator for Integrate |
⊕ | \[CirclePlus] | CIRCLED PLUS | U+2295 | operator for CirclePlus |
keyboard Shortcut Alias for Named Chars
A named character may have one or more aliases for ease of input. For example, to enter α, you can type EscaEsc or EscalphaEsc. Here's some examples:
Glyph | Common Alias |
---|---|
α | a |
π | p |
∞ | inf |
≤ | <= |
° | deg |
Δ | D |
∈ | el |
→ | -> |
Inputting Special Chars
You can input a special character by:
- Use one of the graphical palettes.
- Press Esc, then the char's alias name, then Esc again.
- Copy the Unicode char somewhere and pasting it in Wolfram Notebook.
- Type it like this:
\[Name]
. - Type the Unicode hexadecimal like this:
\:xxxx
or\|xxxxxx