ものがたり(旧)

atsushieno.hatenablog.com に続く

UnicodeCategoryが変わっている

なんかChar.GetUnicodeCategory()で返ってくる値が.NET 2.0で変わったっぽい。Unicodeを扱うクラスごとの互換性はますます乖離していく模様。さて、どのバージョンを使っているのだろうか?


Console.WriteLine (char.GetUnicodeCategory ('\u0221'));
Console.WriteLine (char.GetUnicodeCategory ('\u0237'));
Console.WriteLine (char.GetUnicodeCategory ('\u2047'));
Console.WriteLine (char.GetUnicodeCategory ('\u205F'));

OtherNotAssigned
OtherNotAssigned
OtherPunctuation
SpaceSeparator

どうやらUnicode 3.2のようだ。