Write the format version into the data file.

This commit is contained in:
GoldenCrystal
2014-11-15 12:53:38 +01:00
parent d8acd55cf0
commit 3373855769
3 changed files with 2 additions and 4 deletions
@@ -269,8 +269,8 @@ namespace System.Unicode.Builder
{
using (var writer = new BinaryWriter(stream, Encoding.UTF8, true))
{
writer.Write(new byte[] { (byte)'U', (byte)'C', (byte)'D', 0 });
writer.Write((ushort)7);
writer.Write(new byte[] { (byte)'U', (byte)'C', (byte)'D', 1 });
writer.Write((ushort)7); // Hardcode Unicode 7.0
writer.Write((byte)0);
writer.WriteCodePoint(ucdEntryCount);
for (int i = 0; i < ucdEntryCount; ++i)
-2
View File
@@ -34,9 +34,7 @@ namespace System.Unicode
byte formatVersion = reader.ReadByte();
#if !DEBUG
if (formatVersion != 1) throw new InvalidDataException();
#endif
var unicodeVersion = new Version(reader.ReadUInt16(), reader.ReadByte());
Binary file not shown.