From 34dd4e0a83e19882f61c9a2ac99ecc12632d13d4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 16 Mar 2019 13:59:03 +0200 Subject: 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) : New variable. * etc/NEWS: Mention w32-multibyte-code-page. --- src/w32fns.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/w32fns.c') 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 . */ #ifdef WINDOWSNT #include +#include /* for _getmbcp */ #endif /* WINDOWSNT */ #if CYGWIN @@ -10908,6 +10909,15 @@ globals_of_w32fns (void) doc: /* The ANSI code page used by the system. */); w32_ansi_code_page = GetACP (); +#ifndef CYGWIN + DEFVAR_INT ("w32-multibyte-code-page", + w32_multibyte_code_page, + doc: /* The current multibyte code page used by the system. +A value of zero indicates that the single-byte code page is in use, +see `w32-ansi-code-page'. */); + w32_multibyte_code_page = _getmbcp (); +#endif + if (os_subtype == OS_NT) w32_unicode_gui = 1; else -- cgit v1.2.3