discuss-gnustep
[Top][All Lists]
Advanced

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

Localization of libc and number handling


From: Andreas Heppel
Subject: Localization of libc and number handling
Date: Mon, 23 Jun 2003 12:43:46 +0200

Hi folks,
I again bumped into a Problem having to do with localization of libc and resulting from this problems with GNUstep. I happened to have a problem with the sliders in GWorkspace's Desktop prefs. The either had the value 0 or 1, but nothing inbetween. Tracking this down, I found out, that it had to do with the way, the libc handles floats. As I am using a German locale (LANG=de), all libc functions handling floats (e.g. atof()) expect a decimal comma instead of a point. Unfortunately, [NSNumber -description] uses a locale value of 'nil', resulting in a string representation containing a decimal _point_. This makes atof return 0 as the point is not a valid character in a "German numeric string". The question is, how can a consistent handling of locales between GNUstep and the libc be achieved? I can temporarily set the LANG variable for those apps, but that's not a solution.

Cheers,
Andreas
--
Andreas Heppel

Mail: aheppel at web dot de
Home: http://www.andreasheppel.de

Check out Burn.app - the CD burning frontend for GNUstep
http://gsburn.sourceforge.net





reply via email to

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