gnustep-dev
[Top][All Lists]
Advanced

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

Re: back/x11 XIM fix [was: Re: Gworkspace with non-fragile abi, etc?]


From: David Chisnall
Subject: Re: back/x11 XIM fix [was: Re: Gworkspace with non-fragile abi, etc?]
Date: Fri, 23 Aug 2013 10:15:14 +0100

On 22 Aug 2013, at 22:12, Ivan Vučica <address@hidden> wrote:

> On 22. 8. 2013., at 05:03, "Lee, Seong-Gu" <address@hidden> 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




reply via email to

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