Re: Locale support vs. Carbon -- what the...?
Re: Locale support vs. Carbon -- what the...?
- Subject: Re: Locale support vs. Carbon -- what the...?
- From: Monroe Williams <email@hidden>
- Date: Fri, 25 Feb 2005 16:02:48 -0800
On Feb 25, 2005, at 3:57 PM, Monroe Williams wrote:
I was having some trouble using setlocale() in a reasonably complex,
cross-platform application which links with the Carbon framework,
among other things.
I've constructed a trivially simple test program that calls
setlocale(LC_ALL, "en-US"), and then calls localeconv() and prints out
the relevant parts of the resulting structure.
Gah, proofreading. The program does correctly use "en_US", not "en-US"
as I typed here.
If I build the test program with 'gcc localetest.c -o localetest'
everything works as expected.
If I build the test program with 'gcc -framework Carbon localetest.c
-o localetest' (with NO other changes), the setlocale() call seems to
have no effect. This means that several of the fields I'm interested
in (negative_sign, mon_thousands_sep, and mon_grouping, to be
specific) end up as empty strings.
It seems nonsensical that linking with the Carbon framework would
change the behavior of posix API's like this, but I just saw it
happen.
I realize that there are alternate internationalization API's
available in Carbon, but for my purposes, posix locale support should
be more than sufficient, and there's no reason it shouldn't work.
Any Apple folks care to comment? If there's a simple workaround (that
doesn't involve not linking with Carbon), I'd love to hear it.
------------------------------------------------------------------------
Monroe Williams email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden