mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-31 20:02:42 +00:00
Set locale encoding to UTF-8 when run from OS X GUI.
* src/nsterm.m (ns_init_locale): Append .UTF-8 when setting LANG.
This commit is contained in:
parent
7ad1d075b9
commit
f6497c6e76
@ -596,8 +596,15 @@ - (NSColor *)colorUsingDefaultColorSpace
|
||||
|
||||
@try
|
||||
{
|
||||
/* It seems OS X should probably use UTF-8 everywhere.
|
||||
'localeIdentifier' does not specify the encoding, and I can't
|
||||
find any way to get the OS to tell us which encoding to use,
|
||||
so hard-code '.UTF-8'. */
|
||||
NSString *localeID = [NSString stringWithFormat:@"%@.UTF-8",
|
||||
[locale localeIdentifier]];
|
||||
|
||||
/* Set LANG to locale, but not if LANG is already set. */
|
||||
setenv("LANG", [[locale localeIdentifier] UTF8String], 0);
|
||||
setenv("LANG", [localeID UTF8String], 0);
|
||||
}
|
||||
@catch (NSException *e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user