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
[API Proposal]: Add UnicodeRanges.ArabicExtendedB to System.Text.Encodings.Web #57609
Comments
Tagging subscribers to this area: @tarekgh, @eiriktsarpalis, @layomia Issue DetailsProposalnamespace System.Text.Unicode
{
// existing type
public static class UnicodeRanges
{
// new API
public static UnicodeRange ArabicExtendedB { get; }
}
} DiscussionWhen new versions of Unicode are released, we ingest them into .NET. Typically this ingestion is nothing more than updating the data tables backing System.Private.CoreLib and System.Text.Encodings.Web and does not require new API surface. However, on occasion Unicode will add new blocks to the BMP, and since we expose block information via the As part of #44423, when Unicode 14.0 is released on September 14, we will ingest that data into .NET 7. They're adding a new block Arabic Extended-B to the BMP (more info). This API proposal is to support this new block's usage within our apps.
|
This looks very reasonable |
@terrajobst What would be really nice is if I could correct the capitalization on some existing properties without breaking consumers. ;) |
Expose new properties with right capitalization and hide the old ones :-) |
Meh. Crypto is living proof that having the wrong capitalization isn't a world ending event :-) |
I was kidding :-) |
There is virtualized casing mode for the C# compiler, called |
Looks good as proposed namespace System.Text.Unicode
{
// existing type
public static class UnicodeRanges
{
// new API
public static UnicodeRange ArabicExtendedB { get; }
}
} |
Produced via 'dotnet run -- Blocks.txt "..\..\src\System\Text\Unicode\UnicodeRanges.generated.cs" "..\..\tests\UnicodeRangesTests.generated.cs"' with latest UCD Blocks from https://www.unicode.org/Public/UCD/latest/ucd/Blocks.txt.
I opened a PR with the updates from running the tool: #63901 |
Proposal
Discussion
When new versions of Unicode are released, we ingest them into .NET. Typically this ingestion is nothing more than updating the data tables backing System.Private.CoreLib and System.Text.Encodings.Web and does not require new API surface. However, on occasion Unicode will add new blocks to the BMP, and since we expose block information via the
UnicodeRanges
type, we need to update that type to account for these introductions. This allows consumers of System.Text.Encodings.Web to granularly allow or disallow characters from these blocks to appear unescaped on the wire.The file which contains these APIs is located here and is generated by a tool.
As part of #44423, when Unicode 14.0 is released on September 14, we will ingest that data into .NET 7. They're adding a new block Arabic Extended-B to the BMP (more info). This API proposal is to support this new block's usage within our apps.
The text was updated successfully, but these errors were encountered: