emacs-diffs
[Top][All Lists]
Advanced

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

emacs-28 5e05be5: Fix localized display of date and time in the NS port


From: Eli Zaretskii
Subject: emacs-28 5e05be5: Fix localized display of date and time in the NS port
Date: Sun, 31 Oct 2021 07:34:57 -0400 (EDT)

branch: emacs-28
commit 5e05be566b0e13ce0b4e75da663fb051039f0751
Author: Daniel Martín <mardani29@yahoo.es>
Commit: Eli Zaretskii <eliz@gnu.org>

    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)
---
 src/nsterm.m | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/nsterm.m b/src/nsterm.m
index aa29c13..19ed750 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -543,8 +543,10 @@ ns_init_locale (void)
       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)
     {



reply via email to

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