Uh oh!
There was an error while loading. Please reload this page.
Fix calling NLS with Cultures has alternative sort names - #61992
Conversation
ghost
commented
Nov 23, 2021
Tagging subscribers to this area: @tarekgh, @safern Issue DetailsIn .NET 6.0 and when running on Windows, we have switched to cl NLS to get some properties which are not available with ICU. CultureInfo.TextInfo.ANSICodePage is a good example of that. When we are calling NLS in such cases we use the internal culture name stored in
|
tarekgh
commented
Nov 23, 2021
@safern could you please help reviewing this one? |
I logged the issue for the unrelated CI failure. |
tarekgh
commented
Nov 29, 2021
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1517839642 |
Fixes#61977
In .NET 6.0 and when running on Windows, we have switched to call NLS to get some properties which are not available with ICU. CultureInfo.TextInfo.ANSICodePage is a good example of that. When we are calling NLS in such cases we use the internal culture name stored in
_sWindowsName. The problem here is when using cultures which have alternative sorts (e.g.es-ES_tradnl) such names will be stored ases_ES@collation=tradnlto be used when calling ICU too. If this name is used with NLS, the calls will fail. The fix here is to use the name that works with Windows which is stored in the fieldsRealNameinstead. On NLS mode, _sWindowsName is same as _sRealName so this change shouldn't affect this mode.