Where can I get a list of Unicode chars by class?

0 votes
asked Sep 18, 2010 by lamontecristo

I'm new to learning Unicode, and not sure how much I have to learn based on my ASCII background, but I'm reading the C# spec on rules for identifiers to determine what chars are permitted within Azure Table (which is directly based on the C# spec).

Where can I find a list of Unicode characters that fall into these categories:

  • letter-character: A Unicode character of classes Lu, Ll, Lt, Lm, Lo, or Nl
  • combining-character: A Unicode character of classes Mn or Mc
  • decimal-digit-character: A Unicode character of the class Nd
  • connecting-character: A Unicode character of the class Pc
  • formatting-character: A Unicode character of the class Cf

6 Answers

0 votes
answered Sep 18, 2010 by phil-ross

FileFormat.info has a list of Unicode characters by category:


0 votes
answered Sep 18, 2010 by dtb

You can, of course, use LINQ:

var charInfo = Enumerable.Range(0, 0x110000)
                         .Where(x => x < 0x00d800 || x > 0x00dfff)
                         .GroupBy(s => char.GetUnicodeCategory(s, 0))
                         .ToDictionary(g => g.Key);

foreach (var ch in charInfo[UnicodeCategory.LowercaseLetter])

You can find a list of Unicode categories and their short names on MSDN, e.g., "Ll" is short for UnicodeCategory.LowercaseLetter.

0 votes
answered Sep 18, 2010 by timwi

You can retrieve this information in an automated fashion from the official Unicode data file, UnicodeData.txt, which is published here:

This is a file with semicolon-separated values in each line. The third column tells you the character class of each character.

The benefit of this is that you can get the character name for each character, so you have a better idea of what it is than by just looking at the character itself (e.g. would you know what ბ is? That’s right, it’s Ban. In Georgian. :-))

0 votes
answered Sep 22, 2013 by quentinuk

The easiest way to find these is under menu Edit → Special Characters... This brings up a pop up dialog with all the Unicode characters in categories.

This works on a Mac; I haven't tried Windows.

0 votes
answered Sep 20, 2016 by kvanttt

In the ANTLR lexer you can find Unicode character sets (LU, LL, LT, LM, and LO) in convenient range format.

0 votes
answered Sep 15, 2017 by b3000

https://www.compart.com/en/unicode/category is a pretty useful and easy-to-navigate site for browsing the categories. It is searchable and lists quite a lot of info on individual unicode characters.

Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter