Included a ReadMe, a License file, and a code example.

This commit is contained in:
GoldenCrystal
2014-11-16 01:34:53 +01:00
parent 1990479c4b
commit 12224e88aa
4 changed files with 188 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
using System;
using System.Text;
using System.Unicode;
namespace Example
{
internal static class Program
{
private static void Main()
{
Console.OutputEncoding = Encoding.Unicode;
PrintCodePointInfo('A');
PrintCodePointInfo('∞');
PrintCodePointInfo(0x1F600);
}
private static void PrintCodePointInfo(int codePoint)
{
var charInfo = UnicodeInfo.GetCharInfo(codePoint);
Console.WriteLine(UnicodeInfo.GetDisplayText(charInfo));
Console.WriteLine("U+" + codePoint.ToString("X4"));
Console.WriteLine(charInfo.Name ?? charInfo.OldName);
Console.WriteLine(charInfo.Category);
}
}
}