aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2019-03-16 13:59:03 +0200
committerEli Zaretskii2019-03-16 13:59:03 +0200
commit34dd4e0a83e19882f61c9a2ac99ecc12632d13d4 (patch)
tree4a75c1022d920bba69782097c90b22e03d4a8365 /src
parent164b78c714dd5300cc1e6f630dc596856486b432 (diff)
downloademacs-34dd4e0a83e19882f61c9a2ac99ecc12632d13d4.tar.gz
emacs-34dd4e0a83e19882f61c9a2ac99ecc12632d13d4.zip
Improve locale and language environment setting at startup
* lisp/international/mule-cmds.el (locale-language-names): Add more locales and their language environments. (set-locale-environment): Use w32-multibyte-code-page, if non-zero, as locale-coding-system. (Bug#34684) * src/w32fns.c (globals_of_w32fns) <w32-multibyte-code-page>: New variable. * etc/NEWS: Mention w32-multibyte-code-page.
Diffstat (limited to 'src')
-rw-r--r--src/w32fns.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 4f53d93d8b4..1fbf32760dd 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -48,6 +48,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
48 48
49#ifdef WINDOWSNT 49#ifdef WINDOWSNT
50#include <mbstring.h> 50#include <mbstring.h>
51#include <mbctype.h> /* for _getmbcp */
51#endif /* WINDOWSNT */ 52#endif /* WINDOWSNT */
52 53
53#if CYGWIN 54#if CYGWIN
@@ -10908,6 +10909,15 @@ globals_of_w32fns (void)
10908 doc: /* The ANSI code page used by the system. */); 10909 doc: /* The ANSI code page used by the system. */);
10909 w32_ansi_code_page = GetACP (); 10910 w32_ansi_code_page = GetACP ();
10910 10911
10912#ifndef CYGWIN
10913 DEFVAR_INT ("w32-multibyte-code-page",
10914 w32_multibyte_code_page,
10915 doc: /* The current multibyte code page used by the system.
10916A value of zero indicates that the single-byte code page is in use,
10917see `w32-ansi-code-page'. */);
10918 w32_multibyte_code_page = _getmbcp ();
10919#endif
10920
10911 if (os_subtype == OS_NT) 10921 if (os_subtype == OS_NT)
10912 w32_unicode_gui = 1; 10922 w32_unicode_gui = 1;
10913 else 10923 else