Locale support vs. Carbon -- what the...?
Locale support vs. Carbon -- what the...?
- Subject: Locale support vs. Carbon -- what the...?
- From: Monroe Williams <email@hidden>
- Date: Fri, 25 Feb 2005 15:57:02 -0800
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.
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.
Thanks,
-- monroe
------------------------------------------------------------------------
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