Fix localized display of date and time in the NS port
* src/nsterm.m (ns_init_locale): If not already set, set LC_ALL to the current locale ID so that dates, currencies, etc. use the settings configured in the operating system. (Bug#51321)
This commit is contained in:
parent
335a660b4b
commit
5e05be566b
1 changed files with 3 additions and 1 deletions
|
@ -543,8 +543,10 @@ - (NSColor *)colorUsingDefaultColorSpace
|
|||
NSString *localeID = [NSString stringWithFormat:@"%@.UTF-8",
|
||||
[locale localeIdentifier]];
|
||||
|
||||
/* Set LANG to locale, but not if LANG is already set. */
|
||||
/* Set LANG and LC_ALL to locale, but not if the variables are
|
||||
already set. */
|
||||
setenv("LANG", [localeID UTF8String], 0);
|
||||
setenv("LC_ALL", [localeID UTF8String], 0);
|
||||
}
|
||||
@catch (NSException *e)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue