If it's overtly over-applied and overarching, it may be an overreach (e.g. in nOrway!)

by Michael S. Kaplan, published on 2011/05/27 07:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2011/05/27/10168500.aspx


I will admit there are occasionally times when I consider all the differences between me and the members of my family that I wonder whether I was somehow switched at the hospital or something like that.

Idle thoughts that I quickly discard given how traumatic it would be to take one who had been believed to be a parent and changing the identification.

Given that, it is slightly unfortunate that the parent/child metaphor is used in Windows locales and .NET Framework cultures.

Especially in light of an issue that came up not too long ago....

Isabella's question was, to my line of thinking, profoundly reasonable:

I noticed one undocumented behavior change while debugging. The symptom is the parent culture of “nb-no” changes across 2 .Net versions.

Any idea about this? Is it by design or a bug?

CultureInfo culture = CultureInfo.GetCultureInfo("nb-no");
Console.WriteLine("Parent name: {0}, LCID:{1:X}", culture.Parent.Name, culture.Parent.LCID);

Target Framework: 3.0 / 3.5:        Parent name: no, LCID:14
Target Framework: 4.0 :               Parent name: nb, LCID:7C14

Thanks,
Isabella

All of this is a side effect of a big change that happened in the Windows 7/.NET Framework 4.0 timeframe.

Perhaps undocumented was not the most accurate term for Isabella to use here; either under-documented or poorly documented would have been better, in this case.

The documentation, such as it is, can be found in the white paper entitled Microsoft .NET Framework 4: What is New in Globalization:

Renovating Globalization Information

In the real world, the globalization information is constantly changing because of cultural developments in the local markets, because of new standards which update the culture sensitive information frequently, or because Microsoft finds more accurate information about different markets or expands into more markets. Microsoft .NET Framework 4 supports a minimum of 354 cultures compared to a minimum of 203 cultures in the previous release. Many of those cultures are neutrals that were added to complete the parent chain to the root neutral culture.

This "insertion of neutrals" is the "justification" for the change here, though as justifications go I have a few qualms here.

But then I have other qualms with this white paper, as I discussed previously in my evisceration of the breaking change in the KeyboardLayoutId in Reporting one casualty in the operation; luckily it was the stupidest member of the unit. :-)

Anyway, let me explain my new qualms, and I will let my Norwegian friend Kim (of See Kim. See Kim run. See Kim run setup and find a bug! fame) tell me if I am right or wrong. His review is a great help to me, since more and more often I see Kim my as my own personal ambassador to Norway. This is in no small part due to the fact that plans for the SIAO embassy to Norway in Stjørdalshalsen (a town in Nord-Trøndelag county) have been put on hiatus while I try to figure out how to pronounce Stjørdalshalsen, and to put some distance between me and the original plans to locate the embassy in the nearby village of Hell, a less than brilliant marketing plan to deal with people who would from time to time tell me to Go To Hell, Michael! The whole affair can be attributed to the the influence and impact of attractive Norwegian women who befriend me and say things that sound clever while we are both drinking. Thankfully I was not told to Go To Hell in that context....

Anyway, that was quite a digression! Back to the topic....

If you look at the white paper, it gives a great example of the very good reason for the additional neutrals that were added, namely the cross-script child to parent relationships:

For example, three Inuktitut neutrals were added to the already existing cultures Inuktitut (Syllabics, Canada) and Inuktitut (Latin, Canada) as shown in the following table.

Culture Display Name Culture Name LCID
Inuktitut iu 0x005d
Inuktitut (Syllabics) iu-Cans 0x785D
Inuktitut (Syllabics, Canada) iu-Cans-CA 0x045D
Inuktitut (Latin) iu-Latn 0x7C5D
Inuktitut (Latin, Canada) iu-Latn-CA 0x085D

Table – Example of many new neutrals

Now in resource fallback (the main scenario of the chain) the older chain was really something of a liability since it was crossing the script boundary a little too freely, in this case and many others.

But in the case of Bokmål vs. Nynorsk, we aren't talking about script differences country differences or language differences. We are talking about two theoretical extremes of a dialect-based difference that spans the country of Norway and only Norway, and in actuality the old fallback behavior isn't really bad in any linguistic or market-based sense -- a neutral Nynorsk doesn't really seem to serve much of a real purpose....

In fact, it really looks like a bit of technical over-reaching (an overarching change being over-applied).

Clearly intentional, and therefore by design, I guess.

Though given how traumatic it is to find out that whoever your thought your parent was turns out to not be, perhaps these edge cases should not have been shifted so quickly.

Perhaps not such a good application of the design?


Doug Ewell on 27 May 2011 8:24 AM:

Geez, if I'd known Hell looked like that, I wouldn't have been so worried about last Saturday.

Michael S. Kaplan on 27 May 2011 9:06 AM:

You were worried about it? :-)

Van on 7 Jun 2011 3:07 PM:

@Doug. Unfortunately, this is Hell in the summertime. It gets a lot worse in winter.


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