1

Trying to generate currency type seed data for an application and iterating through the CultureInfo collection of System.Globalization. I kept getting truncation errors on my insert statements until I discovered that when Caribbean comes up (listed at MSDN as CB) a 3 character value of 029 on the TwoLetterISORegionName. I had a serious WTF moment.

Does anyone know why this happens?

To reproduce:

Instantiate the RegionInfo object for the Caribbean.

RegionInfo region = new RegionInfo(9225);

Access the TwoLetterISORegionName property. Value should be CB. Actual value is 026.

D.Forrest
  • 845
  • 1
  • 9
  • 23

1 Answers1

0

It looks like there is no ISO-3166 2-letter ISO Country Code based on the ISO Website. The same goes for the Wikipedia ISO 3166-1 page.

It is quite interesting that Carribean is listed by MSDN. Maybe this is because RegionInfo also applies to geographical regions and not only to countries, but that's just a guess.

jCoder
  • 2,289
  • 23
  • 22
  • 1
    So it's likely that it's a documentation issue rather than a framework issue. Darn. I thought my nerd cred had just gone up by virtue of finding an actual framework bug. – D.Forrest Apr 21 '11 at 20:24
  • I'm not sure that you are wrong with your assumption. It might be misleading to try to cover both regions and countries with the same structure and provide some common methods/properties for it, with leads to some "conflicts". – jCoder Apr 21 '11 at 20:38
  • 1
    I have had it verified by Microsoft that this is a documentation error. They have assured me the knowledge base will be updated to reflect that Caribbean ISO will be returned as 029 per international standard. – D.Forrest Sep 20 '11 at 13:57