discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep on a fresh Debian (S1-E4)


From: Bertrand Dekoninck
Subject: Re: GNUstep on a fresh Debian (S1-E4)
Date: Tue, 08 Mar 2016 19:17:20 +0100
User-agent: Mozilla/5.0 (X11; Linux ppc64; rv:31.0) Gecko/20100101 Icedove/31.5.0

Le 08/03/2016 18:18, Richard Frith-Macdonald a écrit :

I was suspecting the same and dug out my old PowerBook, but in the end it turns 
out that it's really a locale issue. The test program uses code like
  n1 = [NSDecimalNumber decimalNumberWithString: @"0.009"];
to define the decimal numbers. According to Apple's documentation this method 
works with an unspecified locale, so the code works as long as this default 
locale is English (or any other locale that uses a '.' as decimal separator), 
but it breaks as soon as you are in a locale where '.' is not the decimal 
separator (in my case German, where ',' is the decimal separator). I guess, the 
test needs to be changed to use a fixed locale. On the other hand, on OS X with 
Apple's foundation the test seems to work for me even though my default locale 
is set to German. Perhaps while the default locale used by 
-decimalNumberWithString: is unspecified according to Apple's documentation 
they really use a fixed locale regardless of the user's locale nevertheless?

Thanks ... I changed the test to explicitly use [NSLocale systemLocale] ... I 
hope that fixes it.
I looked at the Apple documentation, and to me it reads like they *should* be 
using the German locale.

Applied, compiled, tested...

"address@hidden:~/Bureau/gnustep_svn/modules/core/base/Tests/base/NSNumber$ gnustep-tests test02.m
--- Running tests in . ---

      5 Passed tests

All OK!"

and passed !

Thanks.
Bertrand



reply via email to

[Prev in Thread] Current Thread [Next in Thread]