Friday, February 18, 2005 11:02 AM
Michael S. Kaplan
Ready... set... Reboot!
When you change the default system locale (cf: Windows 2000, Windows XP/Server 2003), you have to reboot your machine.
"But no, Michael," some say, "if I use the method described in that KB article I am not prompted to reboot!"
Well, that is true. And I was imprecise. You can change the setting at will. You can even say "no" to that reboot dialog that pops up in the user interface of Regional and Language Options. But the default system locale has not changed, either.
The problem has to do with when the data is read from the disk. It is actually read by the NT Boot Loader, in real mode. Now the boot loader does not need the data, but it has to load it early. Because there may be drivers that need to do conversions even before the disk drive is available in virtual mode.
Of course this argument becomes less interesting as time goes on since most drivers are written to use Unicode these days. Because most of the APIs they call are Unicode. No one in a low-level driver wants to take the performance hit of converting their strings to Unicode on a regular basis; its easier to just use Unicode to start with, most of the time. Driver writers are particularly sensitive to performance issues here....
Maybe one day they will cut the cord here and say no to non-Unicode components in kernel mode. But I doubt that would happen any time soon since it is hard to tell people that drivers will not work at all. Especially if they do not ever do anything with strings that need to use any of the benefits of Unicode other than this one performance benefit (in which case the benefit is unfortunately mitigated by doubling the data size requirement).
Plus, changing the default system code page of applications out from under them is pretty problematic anyway, and I would not really want to see all of the potential data corruption bugs that could cause.
It is an interesting problem, one that does its best to defy solutions and runs us head-on into battles of backwards compatibility versus best practices.
I'm curious, though.
I realize that my audience may be really biased on the question of Unicodality of drivers and of kernel mode, but what do people out there think?
Brought to you by "ῷ" (U+1ff7, a.k.a. GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI)
One of the over 50,000 graphic characters on the BMP (Basic Multilingual Plane of Unicode) that will not fit into ASCII)