Skip to content

Unicode

Dave DeLong edited this page Sep 18, 2015 · 1 revision

DDMathParser supports parsing unicode characters as extended grapheme clusters. This means that characters are parsed as what the user intends them to be, and not necessarily how the characters are represented internally.

Because DDMathParser is based on more than just the primitive ASCII character set, it can support advanced operator characters. For example, the "less than or equal" operator can be recognized by the expected <= characters, but it can also be recognized as ("LESS-THAN OR EQUAL TO") and ("NOT GREATER-THAN").

Additionally, DDMathParser can recognize unicode characters in places other than operators. All of the unicode-defined fraction characters (½, , , etc.) are interpreted as their numeric equivalent. Also, superscript characters (², , etc) are interpreted as exponents, and even support complex groupings: 2⁽³⁺¹⁻²⁾ is parsed as pow(2, (3+1-2)).