At 3:33 am -0700 8/18/06, Andi Vajda wrote:
On Thu, 17 Aug 2006, Ken Krugler wrote:
For the version of ICU that I've got on my disk (I'm not online
right now) the uprv_getDefaultLocaleID() call in putil.c certainly
could use some work. The copy I have calls GetIntlResource and then
walks it, which (IIRC) is a skanky hack to create something that
works on Mac OS 9 & X.
Jeez, GetIntlResource is something I was working on back in 1986,
and it was a hack then.
If Chandler is only Mac OS X, then there are much better OS X APIs
to use for this information. The Mac port appears to have been done
in 1998, so this might just be legacy code in ICU that's never been
cleaned up.
From a Mac perspective, Chandler is only Mac OS X. Mac OS 9 support
is definitely not in the cards.
I'd be interested in improving ICU with a patch (and therefore
PyICU) in that area. ICU's OS integration needs to work.
My understanding of the task ahead is that ICU needs to be able to
get OS-based locale defaults for:
- locale
- date and time formats
- number and currency formats
- timezone
Am I forgetting something ?
Don't know if you consider this part of the user's i18n settings, but
the default UI language is often tossed into this set.
For example:
http://www.krugle.com/files/cvs/savannah.gnu.org/gnustep/core/base/Source/NSUserDefaults.m
See the userLanguages method. I know, it's Objective C - I don't
really understand it :)
Of concern is that ICU must use C apis, I believe, and I don't know
the level of support provided for this area of Mac OS X functionality
via C calls. I've pinged a friend at Apple.
And ICU needs to update its defaults when the OS sees (and notifies
about) a change in any of these.
Sorry, haven't had to deal with that in the past. But yes, it would be great.
-- Ken
--
Ken Krugler
Krugle, Inc.
+1 530-210-6378
"Find Code, Find Answers"
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev