by Michael S. Kaplan, published on 2006/06/18 14:25 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2006/06/18/636180.aspx
If you are a regular reader of this blog you probably know about how I can't seem to stop bringing up digit substitution.
There is, however, something I forgot to mention about it. So I will take advantage of the dynamic nature of blogs and bring it up now. :-)
I'll start with the setting itself....
Although I have described the setting and its issues/limitations/implementation flaws at length, I never clearly explained the most important part about it.
It is all an illusion.
That is right, this fancy setting is not changing the underlying storage from good old
0 1 2 3 4 5 6 7 8 9
no matter what it looks like on the screen. So if you deal with contents of controls through Win32 APIa/messages or through accessibility hooks, you will not see the Hindi, Thai, Devanagari, or other digits in the program.
Usually the text is being placed somewhere else in the UI which is also affected by the same digit substitution setting, so you may not notice. :-)
Now if you think about all this, it makes sense. As a feature digit substitution is not trying to make every single digit an equivalent, so if you were to literally use the Hindi digits then no setting in Regional and Language Options will alter them. It has the simple job of making the plain old ASCII digits look like one of the other subranges.
In its own way, this is the opposite of what FoldString with the MAP_FOLDDIGITS flag does -- takes all of those other digits and maps them back to the ASCII ones!
(Of course when I talk about ASCII digits here I am still assuming Unicode, I am just talking about the ones down in that U+0030 to U+0039 range!)
So, the next time you are looking at some post of mine (or somebody else's) about digit substitution, be sure to remember that it is all just for show.
And beware the phantom of digit substitution!
This post brought to you by 5 (U+0035, a.k.a. DIGIT FIVE)
# Ben Cooke on 19 Jun 2006 4:24 PM:
# Michael S. Kaplan on 19 Jun 2006 4:27 PM:
2006/06/19 Correct? Intuitive? Both? Neither?
go to newer or older post, or back to index or month or day