diff --git a/UnicodeInformation/UnicodeCharacterRange.cs b/UnicodeInformation/UnicodeCharacterRange.cs index dba9ad5..85ee2ae 100644 --- a/UnicodeInformation/UnicodeCharacterRange.cs +++ b/UnicodeInformation/UnicodeCharacterRange.cs @@ -37,6 +37,8 @@ namespace UnicodeInformation public readonly int FirstCodePoint; public readonly int LastCodePoint; + public bool IsSingleCodePoint { get { return FirstCodePoint == LastCodePoint; } } + public UnicodeCharacterRange(int codePoint) { if (codePoint < 0 || codePoint > 0x10FFFF) throw new ArgumentOutOfRangeException("codePoint"); diff --git a/UnicodeInformation/UnicodeDataManager.cs b/UnicodeInformation/UnicodeDataManager.cs index 4ddc433..e331d9d 100644 --- a/UnicodeInformation/UnicodeDataManager.cs +++ b/UnicodeInformation/UnicodeDataManager.cs @@ -58,7 +58,13 @@ namespace UnicodeInformation name = name.Substring(1, name.Length - 8); rangeStartCodePoint = -1; - } + } + else + { + name = name.Substring(1, name.Length - 2); + + if (codePoint.IsSingleCodePoint) name = name + "-" + codePoint.ToString(); + } } else if (rangeStartCodePoint >= 0) {