diff options
| author | Eli Zaretskii | 2025-01-05 07:56:27 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2025-01-05 07:56:27 +0200 |
| commit | cc5cd4de93d1e5ba205cbf0c370aef4559bc342b (patch) | |
| tree | 71acec11c587e517a2a15da1247b284bc1dcf3a8 /src/w32.c | |
| parent | 441788e06d87c8cbd5efc9f2e00ba9072a824c55 (diff) | |
| download | emacs-cc5cd4de93d1e5ba205cbf0c370aef4559bc342b.tar.gz emacs-cc5cd4de93d1e5ba205cbf0c370aef4559bc342b.zip | |
Fix setup of coding-systems on MS-Windows
* src/emacs.c (main) [HAVE_PDUMPER] [WINDOWSNT]: Call
'w32_init_file_name_codepage' again after loading the pdumper
file.
* src/w32.c (w32_init_file_name_codepage) [HAVE_PDUMPER]:
Reinitialize additional variables. (Bug#75207)
Diffstat (limited to 'src/w32.c')
| -rw-r--r-- | src/w32.c | 13 |
1 files changed, 13 insertions, 0 deletions
| @@ -1685,6 +1685,19 @@ w32_init_file_name_codepage (void) | |||
| 1685 | { | 1685 | { |
| 1686 | file_name_codepage = CP_ACP; | 1686 | file_name_codepage = CP_ACP; |
| 1687 | w32_ansi_code_page = CP_ACP; | 1687 | w32_ansi_code_page = CP_ACP; |
| 1688 | #ifdef HAVE_PDUMPER | ||
| 1689 | /* If we were dumped with pdumper, this function will be called after | ||
| 1690 | loading the pdumper file, and needs to reset the following | ||
| 1691 | variables that come from the dump stage, which could be on a | ||
| 1692 | different system with different default codepages. Then, the | ||
| 1693 | correct value of w32-ansi-code-page will be assigned by | ||
| 1694 | globals_of_w32fns, which is called from 'main'. Until that call | ||
| 1695 | happens, w32-ansi-code-page will have the value of CP_ACP, which | ||
| 1696 | stands for the default ANSI codepage. The other variables will be | ||
| 1697 | computed by codepage_for_filenames below. */ | ||
| 1698 | Vdefault_file_name_coding_system = Qnil; | ||
| 1699 | Vfile_name_coding_system = Qnil; | ||
| 1700 | #endif | ||
| 1688 | } | 1701 | } |
| 1689 | 1702 | ||
| 1690 | /* Produce a Windows ANSI codepage suitable for encoding file names. | 1703 | /* Produce a Windows ANSI codepage suitable for encoding file names. |