[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 f6497c6: Set locale encoding to UTF-8 when run fr
From: |
Anders Lindgren |
Subject: |
[Emacs-diffs] emacs-25 f6497c6: Set locale encoding to UTF-8 when run from OS X GUI. |
Date: |
Fri, 08 Apr 2016 13:55:02 +0000 |
branch: emacs-25
commit f6497c6e760b3b50015f35d7ce5a36df628ee498
Author: Alan Third <address@hidden>
Commit: Anders Lindgren <address@hidden>
Set locale encoding to UTF-8 when run from OS X GUI.
* src/nsterm.m (ns_init_locale): Append .UTF-8 when setting LANG.
---
src/nsterm.m | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 4048ac4..34c5395 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -596,8 +596,15 @@ ns_init_locale (void)
@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:@"address@hidden",
+ [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)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 f6497c6: Set locale encoding to UTF-8 when run from OS X GUI.,
Anders Lindgren <=