Bugfix again :(

This commit is contained in:
GoldenCrystal
2016-01-14 01:46:15 +01:00
parent a09eef8196
commit 301d7b6e98
2 changed files with 2 additions and 0 deletions
@@ -400,6 +400,7 @@ namespace UnicodeInformation.Tests
Assert.AreEqual(charInfo.Name, UnicodeInfo.GetName(i));
Assert.AreEqual(charInfo.Category, UnicodeInfo.GetCategory(i));
Assert.AreEqual(UnicodeInfo.GetDisplayText(charInfo), UnicodeInfo.GetDisplayText(i));
}
}
+1
View File
@@ -425,6 +425,7 @@ namespace System.Unicode
{
if (charInfo.CodePoint <= 0x0020) return ((char)(0x2400 + charInfo.CodePoint)).ToString();
else if (charInfo.Category == UnicodeCategory.NonSpacingMark) return "\u25CC" + char.ConvertFromUtf32(charInfo.CodePoint);
else if (charInfo.CodePoint >= 0xD800 && charInfo.CodePoint <= 0xDFFF) return "\xFFFD";
else return char.ConvertFromUtf32(charInfo.CodePoint);
}