Is it a Unicode issue? A non-Unicode issue? What the hell is it? (aka Beware former [Font ]Associations)

by Michael S. Kaplan, published on 2007/10/25 10:31 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2007/10/25/5660564.aspx


I was in a relationship a few years back with someone who had previously been married.

Then again I was too. We were both damaged goods, technically speaking.

Anyway, her ex, perhaps seeing his influence declining, tended to try to find insidious ways to inflict a bit of anguish here and there, if you know what I mean. Not trying to get her back or anything, but definitely trying to still make sure that he was able to influence things. Hard to put your finger on how or why it had influence, but somehow you'd see the effects every once in a while, and just shrug and dismis ot as something historical....

Wondering how I plan to make this technical? :-)

Well...

Someone with the colorful name of Flying Xu asked in the Suggestion Box:

I have a very stange problem about unicode.

In Windows, Control Panel > Regional and Language Options > Advanced > Language for non-Unicode programs It says that 'It does not affect Unicode programs'

But as to my Unicode program, if I choose English as the 'Language for non-Unicode programs', everything is fine. my program can show Chinese or Korean both in menus and dialogs(but not dialog titles). but if I choose Chinese as the 'Language for non-Unicode programs', My program can't display Korean in dialogs(but menus are ok!), if I choose Korean, my program can't display Chinese in dialogs. It seems that my unicode program is affected.

I tried for a very long time and find that the reason. If I changed the font in my MFC .rc file for my dialogs from 'Trebuchet MS' to 'MS Sans Serif', both Chinese and Korean strings on dialog body are ok to display. it seems that some font are not unicode compatible?

But there is still another problem, the strings on dialog title are not correct yet. After another long time try and error, I find that if I changed font of 'Display Properties'->'Advanced Appearance'->'Active Title bar' to MS Sans Serif, the stings on dialog titles are fixed.

So what's the magic of MS Sans Serif, or are there any fonts not compatible with unicode?

This is actually not a Unicode issue, believe it or not....

The issue here is (as some might have guessed from similarities to conversations in previous posts) actually FONT ASSOCIATION, that masked man that enjoys making font behavior less intuitive in East Asian contexts....

More info on Font Association can be seen in the following posts:

Those posts can also provide some hints on how to work around the issue....

On the whole I am really sorry that this functionality, like many others originally tied to SKU language when SKU language was identical to unchangeable default system locale, wasn't moved to depend on the user interface language, whether the one of the user, the one of the system, or the UI language of the LocalSystem account (which almost never shows UI).

It would have led to much more intuitive behavior in the platform, in my opinion.

In the complex world of so many different language settings, the more intuitive the choices and the behavior manage to be, the better!

The real question is whether making such a change now would be a good idea or not. I tend to think it would be, but some real work to chase down all of the behavior issues would definitely have to happen first, and the change is likely way too risky for a service pack....

Not sure everyone will look at fiont association like a psychological abusive ex, but maybe the metaphor will increase my chances of selling the idea? :-)

 

This post brought to you by (U+330f, a.k.a. SQUARE GANMA)


# Ned Holbrook on 25 Oct 2007 2:15 PM:

I think you meant SQUARE GANMA, not SQUARE GAMMA.

# Michael S. Kaplan on 25 Oct 2007 2:17 PM:

Oops! Good catch. :-)


referenced by

2008/02/29 A more definitive definition of[ Font ]Association (a technology that helps us put the backward in backward compatibility!)

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