-
Notifications
You must be signed in to change notification settings - Fork 1.6k
UTF-7 updates for .NET 5 #4586
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
UTF-7 updates for .NET 5 #4586
Conversation
|
||
- On .NET Core, if no encoding provider has been registered or if no registered encoding provider handles a `codepage` value of 0, it returns the <xref:System.Text.UTF8Encoding>. | ||
|
||
> [!NOTE] | ||
> Some unsupported code pages cause an <xref:System.ArgumentException> to be thrown, whereas others cause a <xref:System.NotSupportedException>. Therefore, your code must catch all exceptions indicated in the Exceptions section. | ||
> - Some unsupported code pages cause an <xref:System.ArgumentException> to be thrown, whereas others cause a <xref:System.NotSupportedException>. Therefore, your code must catch all exceptions indicated in the Exceptions section. | ||
> - In .NET 5.0 and later versions, the code page identifier `65000`, which represents UTF-7, is not supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newly added note.
|
||
> [!NOTE] | ||
> The ANSI code pages can be different on different computers, or can be changed for a single computer, leading to data corruption. For the most consistent results, you should use Unicode, such as UTF-8 (code page 65001) or UTF-16, instead of a specific code page. | ||
In .NET 5.0 and later versions, the code page name `utf-7` is not supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newly added note.
@@ -3754,29 +3718,28 @@ In the .NET Framework, the <xref:System.Text.Encoding.GetEncoding%2A> method rel | |||
## Remarks | |||
|
|||
> [!NOTE] | |||
> Some unsupported code pages cause the exception <xref:System.ArgumentException> to be thrown, whereas others cause <xref:System.NotSupportedException>. Therefore, your code must catch all exceptions indicated in the Exceptions section. | |||
> - Some unsupported code pages cause the exception <xref:System.ArgumentException> to be thrown, whereas others cause <xref:System.NotSupportedException>. Therefore, your code must catch all exceptions indicated in the Exceptions section. | |||
> - In .NET 5.0 and later versions, the code page identifier `65000`, which represents UTF-7, is not supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newly added note.
In addition to the encodings that are natively available on .NET Core or that are intrinsically supported on a specific platform version of the .NET Framework, the <xref:System.Text.Encoding.GetEncoding%2A> method returns any additional encodings that are made available by registering an <xref:System.Text.EncodingProvider> object. If the same encoding has been registered by multiple <xref:System.Text.EncodingProvider> objects, this method returns the last one registered. | ||
In addition to the encodings that are natively available on .NET Core or that are intrinsically supported on a specific platform version of .NET Framework, the <xref:System.Text.Encoding.GetEncoding%2A> method returns any additional encodings that are made available by registering an <xref:System.Text.EncodingProvider> object. If the same encoding has been registered by multiple <xref:System.Text.EncodingProvider> objects, this method returns the last one registered. | ||
|
||
In .NET 5.0 and later versions, the code page name `utf-7` is not supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newly added note.
|57009|x-iscii-ma|ISCII Malayalam|✓||| | ||
|57010|x-iscii-gu|ISCII Gujarati|✓||| | ||
|57011|x-iscii-pa|ISCII Punjabi|✓||| | ||
|65000|utf-7|Unicode (UTF-7)|✓|✓|| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added new column for .NET 5 and left it unchecked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the table reflected at https://review.docs.microsoft.com/en-us/dotnet/api/system.text.encoding?branch=master&view=net-5.0, but the XML looks fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the branch reverted to master in your URL. It's here: https://review.docs.microsoft.com/en-us/dotnet/api/system.text.encoding?branch=pr-en-us-4586&view=net-5.0#list-of-encodings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank LGTM @gewarren
You can when ready.
Please ignore whitespace changes in the diff.
Example preview link (see Remarks section).