For now, assign the unicode label as a code point in the data…
This commit is contained in:
@@ -37,6 +37,8 @@ namespace UnicodeInformation
|
|||||||
public readonly int FirstCodePoint;
|
public readonly int FirstCodePoint;
|
||||||
public readonly int LastCodePoint;
|
public readonly int LastCodePoint;
|
||||||
|
|
||||||
|
public bool IsSingleCodePoint { get { return FirstCodePoint == LastCodePoint; } }
|
||||||
|
|
||||||
public UnicodeCharacterRange(int codePoint)
|
public UnicodeCharacterRange(int codePoint)
|
||||||
{
|
{
|
||||||
if (codePoint < 0 || codePoint > 0x10FFFF) throw new ArgumentOutOfRangeException("codePoint");
|
if (codePoint < 0 || codePoint > 0x10FFFF) throw new ArgumentOutOfRangeException("codePoint");
|
||||||
|
|||||||
@@ -58,7 +58,13 @@ namespace UnicodeInformation
|
|||||||
name = name.Substring(1, name.Length - 8);
|
name = name.Substring(1, name.Length - 8);
|
||||||
|
|
||||||
rangeStartCodePoint = -1;
|
rangeStartCodePoint = -1;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
name = name.Substring(1, name.Length - 2);
|
||||||
|
|
||||||
|
if (codePoint.IsSingleCodePoint) name = name + "-" + codePoint.ToString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (rangeStartCodePoint >= 0)
|
else if (rangeStartCodePoint >= 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user