On 22 Aug 2013, at 22:12, Ivan Vučica <i...@vucica.net> wrote:

> On 22. 8. 2013., at 05:03, "Lee, Seong-Gu" <sgle...@gmail.com> wrote:
>> 
>> PS) Additonally in my opinion as non-developer about FIXME, it had
>> better leave with X system because resetting locale might affect other
>> applications.
> 
> setlocale() will affect only the current process, afaik.

The setlocale() call with "" as the argument will set the locale for the 
current process to the locale of the environment.

This is a really messy bit of POSIX where locale awareness had to be 
retrofitted without breaking code that required the C locale.  Ideally, it 
would have been implemented with symbol versioning and some tricks to say that 
if your code is locale-aware then it uses the locale-aware versions of 
functions and defaults to the one specified in the environment, otherwise it 
would use different versions of the functions without locale support.  Solaris 
libc works like this (and has some really crazy code to support it).  If you're 
writing a locale-aware library, there is no sensible place for the call to go.  
Ideally, I think we should put it in the start of NSApplicationMain(), and 
require anything that uses -gui / -back to make the call explicitly if it isn't 
using NSApplicationMain().

David


_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to