Skip to content

Support the Encoding enumeration in the Encoding Providers #37528

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

Merged
merged 6 commits into from
Jun 9, 2020

Conversation

tarekgh
Copy link
Member

@tarekgh tarekgh commented Jun 5, 2020

Fixes #25819

This change allows the encoding providers to enumerate its supported encoding through EncodingProvider.GetEncodings() method and having Encoding.GetEncodings() list all encodings from all registered providers.
Also, the change fixes the Encoding.BodyName and Encoding.HeaderName properties in our EncodingCodePageProvider implementation to return correct values instead of throwing.

@Dotnet-GitSync-Bot
Copy link
Collaborator

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost
Copy link

ghost commented Jun 5, 2020

Tagging subscribers to this area: @tarekgh, @krwq
Notify danmosemsft if you want to be subscribed.

@tarekgh
Copy link
Member Author

tarekgh commented Jun 5, 2020

@layomia @krwq @GrabYourPitchforks could you please have a look? Thanks.

@joperezr could you please help the changes in the csproj files as we started to support netcoreapp for this library? Thanks.

@tarekgh
Copy link
Member Author

tarekgh commented Jun 8, 2020

@stephentoub thanks for the feedback. I think I have addressed all of them by applying your suggestions. let me know if you have any more feedback or we are good to go.

Copy link
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

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

Other than the small comment about adding a property so the netcoreapp ref isn't shipped in the package, project-related changes look good to me.

@tarekgh
Copy link
Member Author

tarekgh commented Jun 8, 2020

@stephentoub please let me know if you have any other comments. This is pending your approval now. Thanks.

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

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

Thanks.

@GrabYourPitchforks
Copy link
Member

I had two cleanup nits, but nothing that should block checkin. Thanks Tarek for getting to this. :)

@tarekgh
Copy link
Member Author

tarekgh commented Jun 9, 2020

I created a new issue for the CI failure on OSX failure #37629

@tarekgh tarekgh merged commit efe9663 into dotnet:master Jun 9, 2020
akoeplinger added a commit to akoeplinger/runtime that referenced this pull request Jun 16, 2020
…s not supported

Those sneaked in with dotnet#37528 which was merged at the same time as my PR.
akoeplinger added a commit that referenced this pull request Jun 17, 2020
…s not supported (#37992)

Those sneaked in with #37528 which was merged at the same time as my PR #37479.
@tarekgh tarekgh deleted the SupportEncodingEnumeration branch June 22, 2020 16:12
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a GetEncodings method to System.Text.EncodingProvider to support enumerating available character encodings
6 participants