by Michael S. Kaplan, published on 2005/04/08 02:03 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/04/08/406413.aspx
Back after Windows 2000 shipped, everyone though the word LOCALE was simply used too much, in fact that it was OVERused.
It forced Dr. International to ask "Will the Real Locale Please Stand?" and answer it with a mondo big table of Configurable Language an Cultural Settings. And it forced Windows XP to rename the various settings to other terms in the user interface.
I wonder if we ought to be doing the same with the word "DEFAULT" at some point.
At its lowest level, the meaning for the word is the same for all of them: "an option that is selected automatically unless an alternative is specified." This is good as far as it goes.
Default User Locale (returned by the GetUserDefaultLCID API) makes no sense since the user can only have one "user locale" at a time. If they specify an alternative by calling a Win32 API like GetDateFormat with a different LCID, then it is no longer a user locale being specified. Maybe it should just be called the "user locale."
Same deal for the
Default System Locale (returned by the GetSystemDefaultLCID API) which if I try to change today forces a reboot. There is only one "system locale" at a time. If I specify an alternative by calling a Win32 API like GetLocaleInfo with a different LCID to get a different ACP than the CP_ACP via the LOCALE_IDEFAULTANSICODEPAGE flag, it is certainly not the default. Maybe it should just be called the "system locale."
Which only underscores that the
Default ANSI Codepage that CP_ACP represents is not really a default either -- there is only one, until and unless you change the system locale. So default is not the right word to contrast with when you call WideCharToMultiByte with some other code page. Maybe it should be called the "system ANSI code page."
It is not just us, mind you. Moving into the USER subsystem area, they have the notion of a Default Input Language, which can be retrieved by the SPI_GETDEFAULTINPUTLANG flag and set by the SPI_SETDEFAULTINPUTLANG flag of the SystemParametersInfo API (which is incidentally classed as a "BASE" API in the Platform SDK even though it is exported by user32.dll; usually the term BASE refers to the stuff in kernel32.dll). But this is simply the initial HKL of any new thread that is started for a given user. Note that it can never be "overridden" and will always be the first input language; it can just be changed later. So it too is not really a default. Maybe they should call it the "initial input language" instead.
And then moving off into the area of user accounts and profiles, Windows has a
Default User account which you never directly use for the purposes of login. You can get its directory with the GetDefaultUserProfileDirectory API. But that account's directory's contents are essentially used as a template for new user accounts. It is half of what we do when you click on that "Default user account settings" checkbox on the Advanced tab of Regional and Language Options. But it is not really a default -- maybe they should call it the "template account."
And then there is the
.DEFAULT user section of the registry. It is the part of the registry under HKEY_USERS\.DEFAULT and it has in it the information used prior to logging in to the machine. You ever wonder what registry settings control the keyboard list in the logon dialog or the user interface language of the logon dialog or desktop theme of the logon dialog or the user locale of services running under the SYSTEM account or anything else initialized in that early stage of the OS? Its in that section of the registry, and the other half of what that "Default user account settings" checkbox does. But it is not really a default -- maybe they should call it the "system account" especially since it is the system account.
Looking at the world of MUI (Multilingual User Interface, another subteam inside of the GIFT org of which I am a member), they have their GetSystemDefaultUILanguage and GetUserDefaultUILanguage APIs, which suffer from the same problems of (respectively) the GetSystemDefaultLCID and GetUserDefaultLCID APIs. They are not really defaults. Maybe they should simply be called the "system UI language" and "user UI language".
But then we can't really change the names of these various APIs, for obvious reasons. So our
defaulteventual answer is to just leave it like it is, even if some clever person in marketing reads this entry and decides to change all of the names of everything in the user interface like we did with the word "locale" in XP. :-)
Not the best
defaultinitial plan, but backcompat is still king here!
This post brought to you by "ಡ" (U+0ca1, KANNADA LETTER DDA)
# Mike Williams on 8 Apr 2005 4:21 AM:
# Michael S. Kaplan on 8 Apr 2005 8:22 AM:
# CornedBee on 8 Apr 2005 12:10 PM:
# Ravi on 8 Apr 2005 12:51 PM:
# Mike Williams on 8 Apr 2005 7:33 PM:
# Michael S. Kaplan on 8 Apr 2005 8:11 PM:
# Michael S. Kaplan on 8 Apr 2005 8:13 PM:
# Michael S. Kaplan on 8 Apr 2005 8:16 PM:
# Sebastian Redl on 11 Apr 2005 12:00 PM:
2008/11/12 You can either be intuitive and completely inconsistent, or consistent and completely unintuitive!
2006/03/09 Blogging doesn't pay... enough
2005/05/17 The weird, weird world of the SUBLANGID
go to newer or older post, or back to index or month or day