Skip Menu |

This queue is for tickets about the Locale-Codes CPAN distribution.

Report information
The Basics
Id: 92303
Status: resolved
Priority: 0/
Queue: Locale-Codes

People
Owner: Nobody in particular
Requestors: rjbs [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Taiwan seems retired? Seems wrong...
I upgraded today and can no longer convert alpha-2 "tw" to numeric 158. I was amazed that 158 would be retired, and looked it up at iso.org: https://www.iso.org/obp/ui/#iso:code:3166:TW It looks like it should still be there. Am I mistaken? -- rjbs
On 2014-01-20 14:19:40, RJBS wrote: Show quoted text
> I upgraded today and can no longer convert alpha-2 "tw" to numeric > 158. I was amazed that 158 would be retired, and looked it up at > iso.org: https://www.iso.org/obp/ui/#iso:code:3166:TW
I have spent more time on this, this afternoon. A few other seemingly-active countries seem to have their numeric codes retired: cc, cx, um, io. I don't have the full ISO standard, but I can't see evidence that they've retired the *numeric* code but not the *alpha-2* code, which would be sort of odd, I think. Please let me know if there's a way we can move forward from here. -- rjbs
I have some information though I am still doing research on this to determine exactly what is going on. First, the full ISO 3166 is not available for free, so I've never been able to go to iso.org for any information except the alpha-2 list (which is available for free there). Second, the numerical codes are maintained by the UN, and are available here: http://unstats.un.org/unsd/methods/m49/m49alpha.htm that is the source of numerical code data I've been using. This IS being updated (the most recent update Nov 2013, so it's quite recent). If you glance through that list, you can see that it does not include Taiwan, and therefore, it's not (currently) in Locale::Codes. Now the goal of Locale::Codes is to reproduce current standards, so at this point, I have to determine whether the UN list is "the standard" or ISO 3166 is "the standard" (and if it's the latter, I have to make sure that I can get that data). I'll update this as I get more information.
With respect to your second message: The free ISO 3166 (alpha-2) list contains the codes you mention, but not the UN list. At a guess, I'd say that the UN has retired them, but ISO 3166 still keeps them (which goes back to my previous message about having to decide who really is the keeper of the standard). I'm looking for some official documentation about this.
On 2014-01-21 09:53:46, SBECK wrote: Show quoted text
> With respect to your second message: > > The free ISO 3166 (alpha-2) list contains the codes you mention, but > not the UN list. > > At a guess, I'd say that the UN has retired them, but ISO 3166 still > keeps them (which goes back to my previous message about having to > decide who really is the keeper of the standard). > > I'm looking for some official documentation about this.
Thanks. Let me know whether I can help. I considered just telling $Work that we need to buy ISO 3166-2, but it's the 2006 version and its database form is never updated. Updates are distributed as PDFs, and one has to process those one's self. Good grief! I'd almost be willing to do that, if I knew up front that a machine-readable form could then be redistributed legally. I think it could, but would rather not deal with lawyers to find out. :-/ In the meantime, it seems to me like it's not possible to go from "tw" to "158" even using the "retired" API: Locale::Codes::Country::country2code('Taiwan', 'numeric', 'retired') ==> nothing Thanks again for your time and work on this! -- rjbs
One of the things that absolutely drives me crazy is when the world (whatever 'world' means in whatever contect) adopts a standard... and then won't tell you what that standard is. In my opinion, the ISO **** standards should be 100% free. I should be able to go there and download them any time I want. Charging for them is so counter productive, my IQ drops just considering why they made such a stupid decision. Anyway, ISO 3166 now has a stupid javascript interface to browse the standard. It cannot be automatically browsed (the html produced doesn't contain the data... just calls to javascript) so I'll have to manually select the table, paste it into a text file, and then parse it. Extremely annoying, but I may end up doing that IF I decide that I want to use that data rather than the UN list. One problem I have is that Taiwan is NOT really a country... it's under control of China currently, and I'm sure that's why the UN isn't assigning it a number, so in one sense, including it in the list is wrong. But, if ISO 3166 assigns it a number, then I want to include it since I'm interested in reproducing the standard, NOT defining exactly what is meant by a country. Anyway, more info will as I figure this out...
Just to keep you up-to-date... I've decided that the correct solution is to go with the ISO 3166 data. That means that each time I update the codes, I've got a very manual step involved now... but oh well. As a result of this report, I decided that I needed to keep a better eye on how the codes are changing each release, so I redid my scripts for doing this over the past couple days and now. Hopefully, this will remove a source of potential problems (i.e. a source of data behaving in an unexpected way). A new release will be out in a few days (still got to do a little prep work before it's ready to go).
On 2014-01-23 14:49:52, SBECK wrote: Show quoted text
> Just to keep you up-to-date...
Thanks, I appreciate the update and all the work! -- rjbs
I released a new version yesterday with the restored codes.
Thanks very much, it's greatly appreciated! -- rjbs