This page explains some tech detail about how Mathematica uses Unicode.

Mathematica supports Unicode, but does not use Unicode when saving to file. γβΒ Unicode Basics: What's Character Set, Character Encoding, UTF-8?γ

Mathematica files use 7-bits ASCII only. http://www.wolfram.com/technology/nb/

How does it support Unicode if it uses only ASCII?

Mathematica has a set of special characters with the syntax `\[`

. For example:`name`]

Glyph | Syntax |
---|---|

Γ© | `\[EAcute]` |

Γ | `\[CapitalEAcute]` |

Ξ± | `\[Alpha]` |

Ξ | `\[CapitalDelta]` |

β | `\[CirclePlus]` |

β΅ | `\[Because]` |

β | `\[Element]` |

β | `\[Equivalent]` |

β | `\[DoubleStruckCapitalR]` |

So, when you type `\[Alpha]`

, it is displayed as βΞ±β.
(All built-in symbols in Mathematica starts with capital letter.)

You can think of them as HTML's βnamed character entitiesβ. γβΒ Character Sets and Encoding in HTMLγ There are about 900 named chars. http://reference.wolfram.com/mathematica/guide/ListingOfNamedCharacters.html

Many of the named chars are also in Unicode, but not all. Similarly, many Math Symbols in Unicode are not in this list. Also, Unicode's Chinese chars, Arabic alphabets etc, are not in Mathematica's named chars.

When you paste a Unicode char into Mathematica, Mathematica will try to interpret the Unicode as one of the named char.

So, for example, if you paste βΞ±β (GREEK SMALL LETTER ALPHA; βU+x3b1β), it automatically becomes Mathematica's `\[Alpha]`

, and displayed as βΞ±β.

For any Unicode that's not one of Mathematica's named char (such as Chinese chars), their syntax is this: `\:`

, where the `xxxx``xxxx` is Unicode's 4 digit hexidecimal representation of the char. For example, the Chinese char βζ°΄β (water), Unicode hex is β6c34β, in Mathematica is: `\:6c34`

.

The above roughly summarize how Mathematica takes Unicode as input.

Of the named chars, many has special meaning in Mathematica. 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 | Mathematica's name | Unicode name | Unicode hexidecimal | Default Interpretation |
---|---|---|---|---|

β₯ | `\[GreaterEqual]` | GREATER-THAN OR EQUAL TO | 2265 | `GreaterThan` |

Ο | `\[Pi]` | GREEK SMALL LETTER PI | 03c0 | `Pi` |

β | `\[Infinity]` | INFINITY | 221e | `Infinity` |

β« | `\[Integral]` | INTEGRAL | 222b | `Integrate` |

β | `\[Intersection]` | N-ARY INTERSECTION | 22c2 | `Union` |

β | `\[Sum]` | N-ARY SUMMATION | 2211 | `Sum` |

β | `\[Sqrt]` | SQUARE ROOT | 221a | `Sqrt` |

β | `\[CirclePlus]` | CIRCLED PLUS | 2295 | `CirclePlus` |

Note: it appears that it is possible to over-ride the default interpretation of named char to built-in symbol (function, constant), for all or some of the named char. (i haven't investigated on how yet.)

- http://reference.wolfram.com/mathematica/ref/MakeExpression.html
- http://reference.wolfram.com/mathematica/tutorial/Operators.html

Some of the named char has one or more aliases for ease of input. For example, to enter Ξ±, you can type γ`Esc`a`Esc`γ or γ`Esc`alpha`Esc`γ. Here's some examples:

Glyph | Common Alias |
---|---|

Ξ± | a |

Ο | p |

β | inf |

β€ | <= |

Β° | deg |

Ξ | D |

β | el |

β | -> |

- http://reference.wolfram.com/mathematica/tutorial/Introduction-ListingOfNamedCharacters.html
- http://reference.wolfram.com/mathematica/guide/SpecialCharacters.html

You can input a special character by:

- Use one of the graphical palettes.
- Type
`Esc`, then the char's alias name, then`Esc`again. - Copy the Unicode char somewhere and pasting it in Mathematica.
- Type it like this:
`\[`

.`Name`] - Type the Unicode hexadecimal like this:
`\:`

`xxxx`