Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode 16.0 Support #111469

Merged
merged 3 commits into from
Jan 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 28 additions & 29 deletions THIRD-PARTY-NOTICES.TXT
Original file line number Diff line number Diff line change
@@ -34,37 +34,36 @@ License notice for Unicode data

https://www.unicode.org/license.html

Copyright © 1991-2022 Unicode, Inc. All rights reserved.
Copyright © 1991-2024 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in https://www.unicode.org/copyright.html.

Permission is hereby granted, free of charge, to any person obtaining
a copy of the Unicode data files and any associated documentation
(the "Data Files") or Unicode software and any associated documentation
(the "Software") to deal in the Data Files or Software
without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, and/or sell copies of
the Data Files or Software, and to permit persons to whom the Data Files
or Software are furnished to do so, provided that either
(a) this copyright and permission notice appear with all copies
of the Data Files or Software, or
(b) this copyright and permission notice appear in associated
Documentation.

THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THE DATA FILES OR SOFTWARE.

Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale,
use or other dealings in these Data Files or Software without prior
written authorization of the copyright holder.
Permission is hereby granted, free of charge, to any person obtaining a
copy of data files and any associated documentation (the "Data Files") or
software and any associated documentation (the "Software") to deal in the
Data Files or Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, and/or sell
copies of the Data Files or Software, and to permit persons to whom the
Data Files or Software are furnished to do so, provided that either (a)
this copyright and permission notice appear with all copies of the Data
Files or Software, or (b) this copyright and permission notice appear in
associated Documentation.

THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
THIRD PARTY RIGHTS.

IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
FILES OR SOFTWARE.

Except as contained in this notice, the name of a copyright holder shall
not be used in advertising or otherwise to promote the sale, use or other
dealings in these Data Files or Software without prior written
authorization of the copyright holder.

License notice for zlib-ng
-----------------------
Original file line number Diff line number Diff line change
@@ -47,5 +47,9 @@ public enum CodePointFlags : ulong
Unified_Ideograph = 1ul << 31,
Variation_Selector = 1ul << 32,
White_Space = 1ul << 33,
IDS_Unary_Operator = 1ul << 34,
ID_Compat_Math_Continue = 1ul << 35,
ID_Compat_Math_Start = 1ul << 36,
Modifier_Combining_Mark = 1ul << 37,
}
}
Original file line number Diff line number Diff line change
@@ -137,10 +137,21 @@ private static Dictionary<int, string> ProcessDerivedNameFile()
{
if (value.IsSingleCodePoint)
{
// Single code point of format "XXXX ; <Name>" (name shouldn't end with '*')
// Single code point of format "XXXX ; <Name>"
// It is possible to get a * at the end of the line, to add one codepoint to previously added range.
// example:
// 18B00..18CD5 ; KHITAN SMALL SCRIPT CHARACTER-* <<<< IsSingleCodePoint is false
// 18CFF ; KHITAN SMALL SCRIPT CHARACTER-* <<<< IsSingleCodePoint is true

Assert.False(value.PropName.EndsWith('*'));
dict.Add(value.FirstCodePoint, value.PropName);
if (value.PropName.EndsWith('*'))
{
string baseName = value.PropName[..^1];
dict.Add(value.FirstCodePoint, $"{baseName}{value.FirstCodePoint:X4}");
}
else
{
dict.Add(value.FirstCodePoint, value.PropName);
}
}
else
{
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<UnicodeUcdVersion>15.0</UnicodeUcdVersion>
<UnicodeUcdVersion>16.0</UnicodeUcdVersion>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<UnicodeUcdVersion>15.0</UnicodeUcdVersion>
<UnicodeUcdVersion>16.0</UnicodeUcdVersion>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<NoWarn>$(NoWarn);CA1416</NoWarn>
<EnableDefaultItems>true</EnableDefaultItems>
Original file line number Diff line number Diff line change
@@ -204,14 +204,14 @@ private static void PrintValueArray<T>(string tableName, Dictionary<T, byte> d,

private static void PrintByteArray(string tableName, StreamWriter file, byte[] str)
{
file.Write("\n private static ReadOnlySpan<byte> " + tableName + " => new byte[" + str.Length + "]\n {\n");
file.Write("\n private static ReadOnlySpan<byte> " + tableName + " => // " + str.Length + "\n [\n");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commented length is just for readability / debuggability?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it gives some idea about the data size too.

file.Write(" 0x{0:x2}", str[0]);
for (var i = 1; i < str.Length; i++)
{
file.Write(i % 16 == 0 ? ",\n " : ", ");
file.Write("0x{0:x2}", str[i]);
}
file.Write("\n };\n");
file.Write("\n ];\n");
}

private static void PrintAssertTableLevelsBitCountRoutine(string tableName, StreamWriter file, TableLevels expectedLevels)

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -155,7 +155,7 @@ private static int GetLengthOfFirstExtendedGraphemeCluster<T>(ReadOnlySpan<T> in
processor.MoveNext();
}

// Standlone RI scalars (or a single pair of RI scalars) can only be followed by trailers.
// Standalone RI scalars (or a single pair of RI scalars) can only be followed by trailers.

break; // nothing but trailers after the final RI

Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<HybridGlobalization>true</HybridGlobalization>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<UnicodeUcdVersion>15.0</UnicodeUcdVersion>
<UnicodeUcdVersion>16.0</UnicodeUcdVersion>
</PropertyGroup>
<ItemGroup>
<RdXmlFile Include="..\default.rd.xml" />
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<HybridGlobalization>true</HybridGlobalization>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<UnicodeUcdVersion>15.0</UnicodeUcdVersion>
<UnicodeUcdVersion>16.0</UnicodeUcdVersion>
</PropertyGroup>
<ItemGroup>
<RdXmlFile Include="..\default.rd.xml" />
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<!-- This test project is Windows only as it forces the use of NLS as the Globlaization platform -->
<TargetFramework>$(NetCoreAppCurrent)-windows</TargetFramework>
<UnicodeUcdVersion>14.0</UnicodeUcdVersion>
<UnicodeUcdVersion>16.0</UnicodeUcdVersion>
</PropertyGroup>
<ItemGroup>
<RdXmlFile Include="..\default.rd.xml" />
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<UnicodeUcdVersion>15.0</UnicodeUcdVersion>
<UnicodeUcdVersion>16.0</UnicodeUcdVersion>

<!-- some tests require full ICU data, force it -->
<WasmIncludeFullIcuData>true</WasmIncludeFullIcuData>
Original file line number Diff line number Diff line change
@@ -182,7 +182,9 @@ public void ReplacementCharHasTypeOther()
{
// Skip blank or comment-only lines

if (string.IsNullOrEmpty(line) || line[0] == '#')
// We don't support the rule 9.3 yet. skipped for now.
// We track the work in https://github.com/dotnet/runtime/issues/111546
if (string.IsNullOrEmpty(line) || line[0] == '#' || line.Contains("[9.3]"))
{
continue;
}
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ internal static partial class UnicodeHelpers
0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0700..U+077F
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, // U+0780..U+07FF
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x4F, 0xFF, 0x07, 0xFF, 0xFF, // U+0800..U+087F
0xFF, 0x7F, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0880..U+08FF
0xFF, 0x7F, 0x83, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0880..U+08FF
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0900..U+097F
0xEF, 0x9F, 0xF9, 0xFF, 0xFF, 0xFD, 0xC5, 0xF3, 0x9F, 0x79, 0x80, 0xB0, 0xCF, 0xFF, 0xFF, 0x7F, // U+0980..U+09FF
0xEE, 0x87, 0xF9, 0xFF, 0xFF, 0xFD, 0x6D, 0xD3, 0x87, 0x39, 0x02, 0x5E, 0xC0, 0xFF, 0x7F, 0x00, // U+0A00..U+0A7F
@@ -65,10 +65,10 @@ internal static partial class UnicodeHelpers
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0x03, 0xFF, 0xC7, 0xFF, 0xFF, 0xFF, 0xFF, // U+1980..U+19FF
0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x9F, // U+1A00..U+1A7F
0xFF, 0x03, 0xFF, 0x03, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+1A80..U+1AFF
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, // U+1B00..U+1B7F
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1B00..U+1B7F
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xF0, // U+1B80..U+1BFF
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, 0xE3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1C00..U+1C7F
0xFF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, // U+1C80..U+1CFF
0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, // U+1C80..U+1CFF
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1D00..U+1D7F
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1D80..U+1DFF
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1E00..U+1E7F
@@ -83,7 +83,7 @@ internal static partial class UnicodeHelpers
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2280..U+22FF
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2300..U+237F
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2380..U+23FF
0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, // U+2400..U+247F
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, // U+2400..U+247F
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2480..U+24FF
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2500..U+257F
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2580..U+25FF
@@ -106,11 +106,11 @@ internal static partial class UnicodeHelpers
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, // U+2E00..U+2E7F
0xFF, 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, // U+2E80..U+2EFF
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2F00..U+2F7F
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0xFF, 0x0F, // U+2F80..U+2FFF
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0xFF, 0xFF, // U+2F80..U+2FFF
0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3000..U+307F
0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3080..U+30FF
0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3100..U+317F
0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0xFF, 0xFF, // U+3180..U+31FF
0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x80, 0xFF, 0xFF, // U+3180..U+31FF
0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3200..U+327F
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3280..U+32FF
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3300..U+337F
@@ -346,7 +346,7 @@ internal static partial class UnicodeHelpers
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A600..U+A67F
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, // U+A680..U+A6FF
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A700..U+A77F
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xEB, 0x03, 0x00, 0x00, 0xFC, 0xFF, // U+A780..U+A7FF
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xEB, 0x1F, 0x00, 0x00, 0xFC, 0xFF, // U+A780..U+A7FF
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, // U+A800..U+A87F
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, // U+A880..U+A8FF
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x80, 0xFF, 0xFF, 0xFF, 0x1F, // U+A900..U+A97F
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>$(NetCoreAppCurrent);$(NetFrameworkMinimum)</TargetFrameworks>
<UnicodeUcdVersion>15.0</UnicodeUcdVersion>
<UnicodeUcdVersion>16.0</UnicodeUcdVersion>
<!-- CS3021: 'type' does not need a CLSCompliant attribute because the assembly does not have a CLSCompliant attribute -->
<NoWarn Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">$(NoWarn);CS3021</NoWarn>
</PropertyGroup>
Original file line number Diff line number Diff line change
@@ -113,8 +113,8 @@ static void Main(string[] args)
builder.AppendLine("{");
builder.AppendLine(" internal static partial class UnicodeHelpers");
builder.AppendLine(" {");
builder.AppendLine(" private static ReadOnlySpan<byte> DefinedCharsBitmapSpan => new byte[0x2000]");
builder.AppendLine(" {");
builder.AppendLine(" private static ReadOnlySpan<byte> DefinedCharsBitmapSpan => // 0x2000");
builder.AppendLine(" [");

for (int i = 0; i < 0x10000; i += 8)
{
@@ -144,7 +144,7 @@ static void Main(string[] args)
}
}

builder.AppendLine(" };");
builder.AppendLine(" ];");
builder.AppendLine(" }");
builder.AppendLine("}");

Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ This folder contains tools which allow updating the Unicode data within the __Sy

### Current implementation

The current version of the Unicode data checked in is __14.0.0__. The archived files can be found at https://unicode.org/Public/14.0.0/.
The current version of the Unicode data checked in is __16.0.0__. The archived files can be found at https://unicode.org/Public/16.0.0/.

### Updating the implementation

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
namespace System.Text.RegularExpressions.Symbolic
{
#if DEBUG
/// <summary>Utility for generating unicode category ranges and corresponing binary decision diagrams.</summary>
/// <summary>Utility for generating unicode category ranges and corresponding binary decision diagrams.</summary>
[ExcludeFromCodeCoverage(Justification = "Used from tests to generate src data files")]
internal static class UnicodeCategoryRangesGenerator
{
@@ -96,12 +96,15 @@ internal static class {classname}

static void WriteByteArrayInitSyntax(StreamWriter sw, byte[] values)
{
sw.Write("new byte[] {");
for (int i = 0; i < values.Length; i++)
sw.Write("[");
sw.Write($"0x{values[0]:X}");

for (int i = 1; i < values.Length; i++)
{
sw.Write($" 0x{values[i]:X},");
sw.Write($", 0x{values[i]:X}");
}
sw.Write(" }");

sw.Write("]");
}
}

Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

## Overview

This tool is used for generating RegexCaseEquivalences.Data.cs which contains the three tables that will be used for performing matching operations when using RegexOptions.IgnoreCase. This tool will need to be used every time that we are ingesting a new version of Unicode in the repo. The current table contains the Unicode data from version 15.0.0.
This tool is used for generating RegexCaseEquivalences.Data.cs which contains the three tables that will be used for performing matching operations when using RegexOptions.IgnoreCase. This tool will need to be used every time that we are ingesting a new version of Unicode in the repo. The current table contains the Unicode data from version 16.0.0.

## Updating the version of Unicode used

12 changes: 11 additions & 1 deletion src/native/minipal/unicodedata.c
Original file line number Diff line number Diff line change
@@ -288,6 +288,7 @@ static const UnicodeDataRec UnicodeData[] =
{ 0x198, UPPER_CASE, 0x199 },
{ 0x199, LOWER_CASE, 0x198 },
{ 0x19A, LOWER_CASE, 0x23D },
{ 0x19B, LOWER_CASE, 0xA7DC },
{ 0x19C, UPPER_CASE, 0x26F },
{ 0x19D, UPPER_CASE, 0x272 },
{ 0x19E, LOWER_CASE, 0x220 },
@@ -464,6 +465,7 @@ static const UnicodeDataRec UnicodeData[] =
{ 0x260, LOWER_CASE, 0x193 },
{ 0x261, LOWER_CASE, 0xA7AC },
{ 0x263, LOWER_CASE, 0x194 },
{ 0x264, LOWER_CASE, 0xA7CB },
{ 0x265, LOWER_CASE, 0xA78D },
{ 0x266, LOWER_CASE, 0xA7AA },
{ 0x268, LOWER_CASE, 0x197 },
@@ -1169,6 +1171,8 @@ static const UnicodeDataRec UnicodeData[] =
{ 0x1C86, LOWER_CASE, 0x42A },
{ 0x1C87, LOWER_CASE, 0x462 },
{ 0x1C88, LOWER_CASE, 0xA64A },
{ 0x1C89, UPPER_CASE, 0x1C8A },
{ 0x1C8A, LOWER_CASE, 0x1C89 },
{ 0x1C90, UPPER_CASE, 0x10D0 },
{ 0x1C91, UPPER_CASE, 0x10D1 },
{ 0x1C92, UPPER_CASE, 0x10D2 },
@@ -2240,12 +2244,18 @@ static const UnicodeDataRec UnicodeData[] =
{ 0xA7C8, LOWER_CASE, 0xA7C7 },
{ 0xA7C9, UPPER_CASE, 0xA7CA },
{ 0xA7CA, LOWER_CASE, 0xA7C9 },
{ 0xA7CB, UPPER_CASE, 0x264 },
{ 0xA7CC, UPPER_CASE, 0xA7CD },
{ 0xA7CD, LOWER_CASE, 0xA7CC },
{ 0xA7D0, UPPER_CASE, 0xA7D1 },
{ 0xA7D1, LOWER_CASE, 0xA7D0 },
{ 0xA7D6, UPPER_CASE, 0xA7D7 },
{ 0xA7D7, LOWER_CASE, 0xA7D6 },
{ 0xA7D8, UPPER_CASE, 0xA7D9 },
{ 0xA7D9, LOWER_CASE, 0xA7D8 },
{ 0xA7DA, UPPER_CASE, 0xA7DB },
{ 0xA7DB, LOWER_CASE, 0xA7DA },
{ 0xA7DC, UPPER_CASE, 0x19B },
{ 0xA7F5, UPPER_CASE, 0xA7F6 },
{ 0xA7F6, LOWER_CASE, 0xA7F5 },
{ 0xAB53, LOWER_CASE, 0xA7B3 },
@@ -2383,7 +2393,7 @@ static const UnicodeDataRec UnicodeData[] =
{ 0xFF5A, LOWER_CASE, 0xFF3A },
};

#define UNICODE_DATA_SIZE 2359
#define UNICODE_DATA_SIZE 2369

static int LIBC_CALLBACK UnicodeDataComp(const void *opposingCode, const void *elem)
{
Loading