Windows doesn't let you choose the pinch hitter in digit substitution cases

by Michael S. Kaplan, published on 2008/04/21 03:01 -04:00, original URI:

Content of Michael Kaplan's personal blog not approved by Microsoft (see disclaimer)!
Regular readers should keep in mind that all I said in The End? still applies; the allusion to the X-Files continues for people who understand such references....

Developer Gloria asks via the Contact link:

I recently tried to use SetLocaleInfo with LOCALE_SNATIVEDIGITS and the context setting for LOCAL_IDIGITSUBSTITUTION, and it failed. Even when set to native my digits aren't all being used. Are there rules for these settings?

Long-time regular readers might remember where I started to explain what is going on here, in Digits -- there is no substitute. In the end. the digits you select here are not used directly; instead, whatever you put in for the second entry in that ten-character array will guide Uniscribe to decide which hard coded list of characters to use.

The rest is in the LOCALE_IDIGITSUBSTITUTION value, which, if set to the context setting, will only work when PRIMARYLANGID(lcid) is either LANG_PERSIAN or LANG_ARABIC. All other Arabic script and Indic languages that have other digits have this setting ignored unless it is one of the other two settings....

There are other problems with that context setting, which I will discuss in an upcoming blog....


This post brought to you by U+0be6, a.k.a. TAMIL DIGIT ZERO

no comments

referenced by

2011/09/28 Whodvethunk it'd be GDI+ injecting a little sanity into digit shenanigans?

2010/11/12 Suddenly, in a bit more time than a blink of an eye, "standards support" becomes "less i18n support"

2008/10/02 When swimming in a sea of CONTEXT, applications can drown (and there is no lifeguard)

2008/04/21 The pros and cons of context, aka CONTEXT is a four-letter-word

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