[haiku-development] ICU, Locale Kit, and separators

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Thu, 15 Nov 2012 21:49:19 -0500

I could really use some advice on how to solve 2 bugs that both deal
with exposing parts of ICU via the Locale Kit.

The bugs are

https://dev.haiku-os.org/ticket/8503 (Differentiate between ',' and '.')
https://dev.haiku-os.org/ticket/9143 (Deskbar clock doesn't honor
locale formatting)

Both these bugs are essentially the same problem, to solve them I need
to know what the localized separator should be for the given locale,
in the first bug for decimal numbers, the second for time.

The worst part is, ICU _knows_ what the separator should be because it
displays it correctly in Locale, but as far as I can tell, there is no
way to get it to tell me!

Should I try and parse out the separator from the output that ICU
gives me using string parsing? I'm not sure if that will work 100% of
the time but it might.

Is there perhaps a way to patch over ICU to get that feature out
without string parsing?

Or should I maintain my own mapping of locales to separators in the
Locale Kit separate from ICU? I'm pretty sure I could create the
mapping based on what Locale tells me. Of course it would need to be
updated separately.

Any help here would be greatly appreciated.

Other related posts: