diff --git a/UnicodeCharacterInspector/MainWindow.xaml b/UnicodeCharacterInspector/MainWindow.xaml
index 3cec927..2c7c828 100644
--- a/UnicodeCharacterInspector/MainWindow.xaml
+++ b/UnicodeCharacterInspector/MainWindow.xaml
@@ -9,7 +9,7 @@
TextOptions.TextFormattingMode="Display"
Title="Unicode character inspector"
Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
- Height="350" Width="525">
+ Height="450" Width="525">
diff --git a/UnicodeInformation.Builder/Program.cs b/UnicodeInformation.Builder/Program.cs
index 8743060..bf1fdac 100644
--- a/UnicodeInformation.Builder/Program.cs
+++ b/UnicodeInformation.Builder/Program.cs
@@ -117,7 +117,7 @@ namespace System.Unicode.Builder
using (var ucdSource = GetUcdSource(null, null, null))
{
- data = UnicodeDataManager.BuildDataAsync(ucdSource).Result;
+ data = UnicodeDataProcessor.BuildDataAsync(ucdSource).Result;
}
using (var stream = new DeflateStream(File.Create("ucd.dat"), CompressionLevel.Optimal, false))
diff --git a/UnicodeInformation.Builder/UnicodeDataManager.cs b/UnicodeInformation.Builder/UnicodeDataProcessor.cs
similarity index 89%
rename from UnicodeInformation.Builder/UnicodeDataManager.cs
rename to UnicodeInformation.Builder/UnicodeDataProcessor.cs
index f8dbb5e..035935e 100644
--- a/UnicodeInformation.Builder/UnicodeDataManager.cs
+++ b/UnicodeInformation.Builder/UnicodeDataProcessor.cs
@@ -8,7 +8,7 @@ using System.Threading.Tasks;
namespace System.Unicode.Builder
{
- public class UnicodeDataManager
+ public class UnicodeDataProcessor
{
public const string UnicodeDataFileName = "UnicodeData.txt";
public const string PropListFileName = "PropList.txt";
@@ -55,15 +55,18 @@ namespace System.Unicode.Builder
codePoint = new UnicodeCharacterRange(rangeStartCodePoint, codePoint.LastCodePoint);
- name = name.Substring(1, name.Length - 8);
+ name = name.Substring(1, name.Length - 8).ToUpperInvariant(); // Upper-case the name in order to respect unicode naming scheme. (Spec says all names are uppercase ASCII)
rangeStartCodePoint = -1;
}
+ else if (name == "") // Ignore the name of the property for these code points, as it should really be empty by the spec.
+ {
+ // For control characters, we can derive a character label in of the form , which is not the character name.
+ name = null;
+ }
else
{
- name = name.Substring(1, name.Length - 2);
-
- if (codePoint.IsSingleCodePoint) name = name + "-" + codePoint.ToString();
+ throw new InvalidDataException("Unexpected code point name tag: " + name + ".");
}
}
else if (rangeStartCodePoint >= 0)
diff --git a/UnicodeInformation.Builder/UnicodeInformation.Builder.csproj b/UnicodeInformation.Builder/UnicodeInformation.Builder.csproj
index 00b9aa2..d70cb1f 100644
--- a/UnicodeInformation.Builder/UnicodeInformation.Builder.csproj
+++ b/UnicodeInformation.Builder/UnicodeInformation.Builder.csproj
@@ -62,7 +62,7 @@
-
+
diff --git a/UnicodeInformation.Tests/UnicodeDataManagerTests.cs b/UnicodeInformation.Tests/UnicodeDataManagerTests.cs
index 4f4f20e..73b1e47 100644
--- a/UnicodeInformation.Tests/UnicodeDataManagerTests.cs
+++ b/UnicodeInformation.Tests/UnicodeDataManagerTests.cs
@@ -38,7 +38,7 @@ namespace System.Unicode.Tests
{
var source = new FileUcdSource(UcdDirectoryName);
- var data = (await UnicodeDataManager.BuildDataAsync(source)).ToUnicodeData();
+ var data = (await UnicodeDataProcessor.BuildDataAsync(source)).ToUnicodeData();
Assert.AreEqual((int)'\t', data.Get('\t').CodePoint);
}
@@ -48,7 +48,7 @@ namespace System.Unicode.Tests
{
var source = new FileUcdSource(UcdDirectoryName);
- var data = await UnicodeDataManager.BuildDataAsync(source);
+ var data = await UnicodeDataProcessor.BuildDataAsync(source);
using (var stream = new DeflateStream(File.Create("ucd.dat"), CompressionLevel.Optimal, false))
{
diff --git a/UnicodeInformation/ucd.dat b/UnicodeInformation/ucd.dat
index 7e5dabb..c502089 100644
Binary files a/UnicodeInformation/ucd.dat and b/UnicodeInformation/ucd.dat differ