-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Converting from GB18030 encoded bytes to chars throws Exception #110521
Comments
Our product supports receiving GB18030 encoded text in DICOM data. This error prohibits us migrating to net9. Is this breaking change something that would be fixed or is this encoding not supported anymore? |
Works with .NET 8 https://dotnetfiddle.net/BUQChY |
@tarekgh can you please have a look? |
Tagging subscribers to this area: @dotnet/area-system-globalization |
Tagging subscribers to this area: @dotnet/area-system-text-encoding |
This is now fixed by the PR #111367. The fix will be released in the next 9.0 servicing release. |
Description
Converting from GB18030 encoded data to string throws an exception in net9.
Reproduction Steps
This code throws the exception on net9 but not on net8.
Expected behavior
The conversion from bytes to chars does not throw an exception.
Actual behavior
Regression?
Yes
Known Workarounds
none
Configuration
.net 9
Windows
x64
Other information
There was a change (861164c) that modified the if statement in
EncodingCharBuffer.AddChar
. Maybe the logic for uninitialized chars and "counting" has changed.The text was updated successfully, but these errors were encountered: