-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
DotNet 5.0 IdnMapping.GetAscii throws ArgumentException #60478
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @tarekgh, @safern Issue DetailsDescriptionI wrote an example console application:
When I run program on .Net Core 3.1 output is:
When I run program on .Net 5.0 output is:
Are there any breaking changes in DotNet 5 for IdnMapping? ConfigurationVersion of .NET: 3.1.13, 5.0.9
|
@HelenMakarchuk in .NET 5.0 we have switched to use ICU library. In .NET 3.1 we were using the native Windows NLS APIs for IDN. you can learn more about this change in the doc. Looking at the case in your repro, looks the length of the string is what is causing the failure. If I remove just one character from the end of the string, it will succeed. if you want to go back to old behavior (which we don't recommend doing that as ICU behavior is more correct), you may follow this instructions. Let me know if you need any more help if you are blocked. |
I confirmed that ICU is failing the call with the info error |
Thank you for the detailed answer |
Description
I wrote an example console application:
When I run program on .Net Core 3.1 output is:
When I run program on .Net 5.0 output is:
Are there any breaking changes in DotNet 5 for IdnMapping?
What requirements should be for an input string (characters count, known encoding dependencies, etc)?
Configuration
Version of .NET: 3.1.13, 5.0.9
OS: Windows 10 Enterprise 20H2 (build 19042.1237)
PC Architecture: x64
IDE: Microsoft Visual Studio Community 2019 (version 16.9.2)
Solution platform: ANY CPU
The text was updated successfully, but these errors were encountered: