The Pharo image has a table of Unicode Character Categories in a class variable
GeneralCategory of class Unicode. But there do not seem to be many methods to
interpret this data. For example, while there is a method
Unicode class >> #isDigit: aCharacter
that checks if the Unicode category of aCharacter is Nd, and
Unicode class >> #isLetter: aCharacter
that checks if aCharacter is in one of the letter categories, there does not
seem to be a general way of asking “what is the category of this character”.
I want to check if a character is a mathematical symbol, that is, if it is in
the Unicode Category Sm. What’s the right way of doing this?
Would it be reasonable to add a method Unicode class >> #category: aCharacter
that answers one of the 29 category symbols #Cc to #Zs? Or “is” methods for
each category?
Andrew