Write the format version into the data file.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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.
Reference in New Issue
Block a user