Hmm... The results you're getting are quite strange. The only time these method returns NaN is if the object is not a NSNumber. If it is, than we just send it through icu to get converted. The problem here is that either libicu is returning 'NaN' for these values or NSNumber is return nil.
Could you run and report the output of the attach test? I just want to make sure libicu is doing it's thing correctly. To build it: gcc `icu-config --ldflags` -licuio test_unum.c Thanks On Sun, Mar 6, 2011 at 7:02 AM, <ici...@mail.cg.tuwien.ac.at> wrote: > > Hi! > > Test results, lots of NSNumberFormatter fails. I am using ICU 4.6. > > Cheers, > TOM > > > _______________________________________________ > Gnustep-dev mailing list > Gnustep-dev@gnu.org > http://lists.gnu.org/mailman/listinfo/gnustep-dev > >
#include <unicode/unum.h> #include <unicode/ustdio.h> #include <stdio.h> void main (void) { UChar buffer[256]; double d = 1234.56; int i = 1234; UNumberFormat *fmt; UErrorCode err = U_ZERO_ERROR; UFILE *out = u_finit (stdout, NULL, NULL); fmt = unum_open(UNUM_IGNORE, NULL, 0, NULL, NULL, &err); unum_formatDouble(fmt, d, buffer, 256, NULL, &err); u_fprintf(out, "%f = %S\n", d, buffer); unum_format(fmt, i, buffer, 256, NULL, &err); u_fprintf(out, "%d = %S\n", i, buffer); }
_______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org http://lists.gnu.org/mailman/listinfo/gnustep-dev