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

[API Proposal]: Add UnicodeRanges.ArabicExtendedB to System.Text.Encodings.Web #57609

Closed
GrabYourPitchforks opened this issue Aug 17, 2021 · 9 comments · Fixed by #63901
Closed
Labels
api-approved API was approved in API review, it can be implemented area-System.Text.Encodings.Web
Milestone

Comments

@GrabYourPitchforks
Copy link
Member

GrabYourPitchforks commented Aug 17, 2021

Proposal

namespace System.Text.Unicode
{
    // existing type
    public static class UnicodeRanges
    {
        // new API
        public static UnicodeRange ArabicExtendedB { get; }
    }
}

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.

@GrabYourPitchforks GrabYourPitchforks added area-System.Text.Encodings.Web api-ready-for-review API is ready for review, it is NOT ready for implementation labels Aug 17, 2021
@GrabYourPitchforks GrabYourPitchforks added this to the 7.0.0 milestone Aug 17, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Aug 17, 2021
@ghost
Copy link

ghost commented Aug 17, 2021

Tagging subscribers to this area: @tarekgh, @eiriktsarpalis, @layomia
See info in area-owners.md if you want to be subscribed.

Issue Details

Proposal

namespace System.Text.Unicode
{
    // existing type
    public static class UnicodeRanges
    {
        // new API
        public static UnicodeRange ArabicExtendedB { get; }
    }
}

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.

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.

Author: GrabYourPitchforks
Assignees: -
Labels:

area-System.Text.Encodings.Web, api-ready-for-review

Milestone: 7.0.0

@jeffhandley jeffhandley removed the untriaged New issue has not been triaged by the area owner label Aug 18, 2021
@terrajobst
Copy link
Member

This looks very reasonable

@GrabYourPitchforks
Copy link
Member Author

@terrajobst What would be really nice is if I could correct the capitalization on some existing properties without breaking consumers. ;)

@tarekgh
Copy link
Member

tarekgh commented Aug 18, 2021

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 :-)

@terrajobst
Copy link
Member

Meh. Crypto is living proof that having the wrong capitalization isn't a world ending event :-)

@tarekgh
Copy link
Member

tarekgh commented Aug 18, 2021

Meh. Crypto is living proof that having the wrong capitalization isn't a world ending event :-)

I was kidding :-)
One option we can file issue for C# compiler to be not case sensitive and just break the world :-) ... kidding again.

@terrajobst
Copy link
Member

There is virtualized casing mode for the C# compiler, called vbc 😝

@terrajobst terrajobst added api-approved API was approved in API review, it can be implemented and removed api-ready-for-review API is ready for review, it is NOT ready for implementation labels Aug 24, 2021
@terrajobst
Copy link
Member

terrajobst commented Aug 24, 2021

Video

Looks good as proposed

namespace System.Text.Unicode
{
    // existing type
    public static class UnicodeRanges
    {
        // new API
        public static UnicodeRange ArabicExtendedB { get; }
    }
}

bgrainger added a commit to bgrainger/runtime that referenced this issue Jan 17, 2022
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.
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jan 17, 2022
@bgrainger
Copy link
Contributor

The file which contains these APIs is located here and is generated by a tool.

I opened a PR with the updates from running the tool: #63901

@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jan 18, 2022
@dotnet dotnet locked as resolved and limited conversation to collaborators Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-approved API was approved in API review, it can be implemented area-System.Text.Encodings.Web
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants