Nope, it is not. The issue arises when "unum_formatDouble" is called inside NSNumberFormatter, which converts a double to a string representation, and it always returns a string containing "NaN". Stefan's standalone test program does work, but inside NSNumberFormatter something gets terribly wrong. I even copied most of the test program's code right into a method in NSNumberFormatter and it starts failing in there too, even though it's a standalone chunk of code.

TOM


Quoting Lars Sonchocky-Helldorf <[email protected]>:


Am 06.03.2011 um 18:57 schrieb [email protected]:

Hi,

icicle@nordpol-laptop:~/Desktop/ICUtest$ gcc `icu-config --cflags` `icu-config --ldflags` -licuio -o test test_unum.c
test_unum.c:6: Warnung: Rückgabetyp von »main« ist nicht »int«
icicle@nordpol-laptop:~/Desktop/ICUtest$ ./test
1.234,560000 = 1234,56
1.234 = 1234


Could it be a Locale issue, since my Ubuntu uses a german one (LANG="de_DE.UTF-8")?

So maybe it's a decimal dots issue. In the German locale you would usually write: 1,23 instead of 1.23

Could this be the cause for the NaNs?


cheers,

        Lars


_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to