Uh oh!
There was an error while loading. Please reload this page.
Fix Native Digits Support - #71045
Conversation
ghost
commented
Jun 21, 2022
Tagging subscribers to this area: @dotnet/area-system-globalization Issue DetailsWe always assumed the native digits always one character. This was the case for NLS. Now in ICU, there are some locales which use native digits expressed as surrogate pairs.
|
tarekgh
commented
Jun 21, 2022
CC @eerhardt@maryamariyan if you can help review it. |
danmoseley
commented
Jun 21, 2022
Does this affect treatment of |
stephentoub
commented
Jun 21, 2022
No |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
tarekgh
commented
Jun 22, 2022
@eerhardt@stephentoub do you have any more comments? |
Uh oh!
There was an error while loading. Please reload this page.
| } while (ffffPos < digits.Length && index < 10); | ||
| Debug.Assert(index >= 10, $"Couldn't read native digits for '{_sWindowsName}' successfully."); |
There was a problem hiding this comment.
Should this be index == 10? result is exactly 10 items long, so if we tried to do result[10], it would have thrown.
There was a problem hiding this comment.
Yes, we can do that. I am not sure if this is worth another PR though.
We always assumed the native digits one character. This was the case for NLS. Now in ICU, there are some locales which use native digits expressed as surrogate pairs.
ccp-Cakm-BDlocale is a good example of that which uses the native digits"\U0001E950", "\U0001E951", "\U0001E952", "\U0001E953", "\U0001E954", "\U0001E955", "\U0001E956", "\U0001E957", "\U0001E958", "\U0001E959". This change is to allow reading the native digits correctly from ICU.