[Top][All Lists]

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

Re: Locale usage

From: Richard Frith-Macdonald
Subject: Re: Locale usage
Date: Mon, 30 Apr 2001 17:33:36 +0100

On Monday, April 30, 2001, at 03:45 PM, Adam Fedor wrote:

Richard Frith-Macdonald wrote:

Ideally, the code in GSFormat.m should be extended to handle floats
rather than using sprintf() ... I think any rewriting of sprintf()
output is
going to be error prone and inefficient.

I think you can set the locale to 'C' just for numeric conversion. Would
that be sufficient?

Problem is ... what if something else (possibly in another thread) sets it back.

Also, we actually need to use a different NSDecimalSeparator or NSThousandsSeparator when we are in a method like initWithFormat:locale: and another locale dictionary is supplied ... so we would need to either change the locale within the method, or
use the C/POSIX locale and rewrite afterwords.

Certainly, I see setting the locale to C/POSIX as a temporary solution within certain
limitations, but I can't see it as a long term solution to the problem.
I think in the long term we have to 'steal' the libc code and hack it to use the OpenStep
locale dictionary stuff.

reply via email to

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