Windows maps both "ku" and "ckb" to the same LCID.

Description

ICU 63 adds a locale for "ku" (Kurdish, Latin script, equivalent to "kmr" Northern Kurdish for Turkey); ICU already had a locale for "ckb" (Central Kurdish for Iraq, Arabic script).

However, on Windows platforms, both "ku" and "ckb" get mapped to LCID 0x0092 (which Windows defines as "ku" Central Kurdish for Iraq), but 0x0092 gets mapped back to "ckb". This leads to the following ICU4C test failure on Windows machines:

Need to fix the mapping (most likely) or the test.

---------------------------

Unfortunately, there isn't much that can be done on the ICU for this, other than to note this as a known issue.

Activity

Show:
Jeff Genovy
October 5, 2018, 5:07 AM
Edited

Unfortunately, I don't think there is much that can be done to "fix" this at the moment.

On Windows both 'ku' and 'ckb' are mapped (or aliased) to the same entity which has the LCID 0x0092. It doesn't matter if you use LCIDs or even the string or 'locale name' based APIs, as both will yield the same results.

For example, both "ckb-IQ" and "ku-Arab-IQ" map to the same LCID of 0x0492.
(This is somewhat loosely related to ICU-13119, in that the same LCID value doesn't round-trip).

This mapping/aliasing is unfortunate, and appears to have been done for questionable reasons at the time, that no longer seem valid. We might be able to revisit this aliasing/mapping and potentially add a ckb locale, but that won't help on older versions of Windows.

So, I think the most we can likely do for ICU 63.1 is to add a known issue to the test (which Peter already did [thank you]) and then add a note that this as a "known issue" on the download page.

Jeff Genovy
October 5, 2018, 5:43 AM

I think the two main areas that would be impacted by this ku/ckb issue are:

  • Using "@compat=host" for formatting for date/time. (Since this relies on calling OS APIs with LCIDs)

  • Conversion functions that convert to/from locale names and LCIDs.

From issue ICU-13119, usage of 'compat=host' apparently isn't very common. I'm not sure how common converting to/from LCIDs is, though hopefully it is not very common as LCIDs have been discouraged from usage since Vista, and are generally discouraged.
Given this, I don't think this ticket/issue should be marked as critical, so I will adjust it to medium.

Markus Scherer
October 5, 2018, 6:52 PM

For reference – I found that we ran into the ku/ckb LCID issue for ICU 58.
Team members can look at an internal thread on 2016-oct-12/13 about "Integrated CLDR 30.0.1 into ICU; Windows LCID mapping issue".

Assignee

Jeff Genovy

Reporter

Peter Edberg

Components

Labels

Reviewer

None

Priority

medium

Time Needed

None

Fix versions

Configure