Sorry it's been so long. I've been absolutely swamped at work.
I think this patch would break the X input managers handling of
character sets in the backend, so I'm not sure I should apply it. Is the
specific problem to do with numbers only (LC_NUMERIC)? We could probably
set english locale for everything except LC_CTYPE. Perhaps that would be
sufficient.
Georg Fleischmann wrote:
> Hi,
>
> here are two small patches to fix a problem with the default locale.
> My problem was that if the environment is set to German, the results of
> methods using the default locale change: The Decimal Separator may be komma or
> dot depending on the environment.
> My OpenStep docs say that the default locale is US English.
>
> The 1st patch changes NSObject to set the default locale to en_US instead of
> using the environment.
>
> The 2nd patch for NSUserDefaults sets the default locale back to en_US after
> reading the environment settings.
>
> Georg
>
>
> 2002-05-30 Georg Fleischmann
>
> * base/Source/NSObject.m
> [NSObject +initialize]: set default locale to US English
> * base/Source/NSUserDefaults.m
> [NSUserDefaults +userLanguages]: set locale back to default
>
>
>
> *** base/Source/NSObject.m.old Thu May 30 18:19:48 2002
> --- base/Source/NSObject.m Thu May 30 18:12:17 2002
> ***************
> *** 713,719 ****
> }
> #endif
>
> ! GSSetLocaleC(""); // Set up locale from environment.
>
> // Create the global lock
> gnustep_global_lock = [[NSRecursiveLock alloc] init];
> --- 713,719 ----
> }
> #endif
>
> ! GSSetLocaleC("en_US"); // Set up default locale (US English).
>
> // Create the global lock
> gnustep_global_lock = [[NSRecursiveLock alloc] init];
>
>
>
> *** base/Source/NSUserDefaults.m.old Tue Mar 26 20:00:07 2002
> --- base/Source/NSUserDefaults.m Thu May 30 19:46:36 2002
> ***************
> *** 450,455 ****
> --- 450,456 ----
> }
> userLanguages = RETAIN([NSMutableArray arrayWithCapacity: 5]);
> locale = GSSetLocale(@"");
> + GSSetLocale(@"en_US");
> if (sharedDefaults == nil)
> {
> /* Create our own defaults to get "NSLanguages" since sharedDefaults
--
Adam Fedor, Digital Optics Corp. | I'm glad I hate spinach, because
http://www.doc.com | if I didn't, I'd eat it, and you
| know how I hate the stuff.
_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep