by Michael S. Kaplan, published on 2011/10/05 07:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2011/10/05/10220274.aspx
So the thing about Digit Substitution is that it is generally an all or nothing feature.
You either have some special digits and you make the change to support them, or you have no special digits and you choose to not support them.
Oh yeah, and sometimes you occasionally have no special digits yet you change to them anyway.
That third case is kind of a bug, previously described in A difference that makes no difference makes a blog.
Ok, so you have these two settings:
Native equivalents of ASCII 0 through 9. The maximum number of characters allowed for this string is eleven, including a terminating null character. For example, Arabic uses "٠١٢٣٤٥ ٦٧٨٩". See also LOCALE_IDIGITSUBSTITUTION.
Value | Meaning |
---|---|
0 | Context-based substitution. Digits are displayed based on the previous text in the same output. European digits follow Latin scripts, Arabic-Indic digits follow Arabic text, and other national digits follow text written in various other scripts. When there is no preceding text, the locale and the displayed reading order determine digit substitution, as shown in the following table.
Locale Reading order Digits used
Arabic Right-to-left Arabic-Indic
Thai Left-to-right Thai digits
All others Any No substitution used
|
1 | No substitution used. Full Unicode compatibility. |
2 | Native digit substitution. National shapes are displayed according to LOCALE_SNATIVEDIGITS. |
and the three options:
I assume many of my readers know enough about logic to suddenly see the case we've never gotten into before....
Interesting? I'll tell you, I think so.
If we did cover this case, where would we use it?
Would it be a bug like the third case?
Discuss amongst yourselves; tomorrow I'll jump in with my thoughts....
referenced by