‎١‎, ‎٢‎, ‎٣‎ o'clock, ‎٤‎ o'clock digit substitution...

by Michael S. Kaplan, published on 2012/04/16 07:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2012/04/16/10293962.aspx

The other day in The evolving Story of Locale Support, part 22: Digit Substitution 2.0, I waxed on quite enthusiastically about the capabilities of Digit Substitution in the Windows Runtime (WinRT).

Since then. I've had a bunch of people ask me to provide some more details to justify me interest, and my excitement.

Okay, fair enough.

Not everyone can read my mind, after all! :-)

First and foremost is that it negates the need to heavily worry about the IE discussed in Suddenly, in a bit more time than a blink of an eye, 'standards support' becomes 'less i18n support'. Developers of applications can use the WinRT globalization to work around the fact that Internet Explorer decided to not do any of the support provided previously.

The new design gets around many previous limitations, like how the old support was a rendering-based illusion, that the underlying numbers were still plain old 0-9.

And the fact that there was no good way to distinguish the "illusion" numbers provided by Digit Substitution and actual native digits (which exist on some keyboards and in Unicode). That built-in sense of confusion is something that many will be happy to see start to go away.

Support for different sets of digits depending on scenario if just really amazing for those who need it.

And the ability to display the plain old ASCII style digits when you need to -- even when set to National digit support, improves the story further.

The lack of keyboard support in so many cases? Who cares? ;-)

You should also include the fact that you don't need to rely on a single, global setting per user.

Parsing support? No one can even pretend that isn't really cool....

Excited now?

Holy crap, I want to try to use the new support in older apps to see how much I can use it there!

Jan Kučera on 16 Apr 2012 9:49 AM:

OT: How was the title intended? Outlook & IE on W8 CP render it as one, two, three, but this text box and Windows Phone as three, two, one... reading from left, need to say. :-)

asdf on 16 Apr 2012 10:11 AM:

Parsing support is pretty big, I'd say almost 50% big even.

asdf on 16 Apr 2012 10:19 AM:

Since you are talking about WinRT, could you talk a little bit about how the internals work? I would assume that all the other languages pass a WinRT string to the c++ version? Does it use the same string type when parsing and building strings or are we down to C strings once you are on the inside? Were there any plans to use UTF8 etc

Minos on 16 Apr 2012 12:13 PM:

I noticed that, too, Jan.  Firefox renders the first 3 numbers right-to-left, but IE renders them left-to-right.  I don't see any directionality overrides, but that may be a shortcoming of my tools.

Michael S. Kaplan on 16 Apr 2012 5:52 PM:

I wonder if sprinkling some LRMs in there fixes anything....

Michael S. Kaplan on 16 Apr 2012 10:31 PM:

Looks like it does!

Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

go to newer or older post, or back to index or month or day