GNU bug report logs - #79296
30.2; format-time-string returns wrongly encoded string in MS Windows Japanese with cp65001 beta config

Previous Next

Package: emacs;

Reported by: Shingo Tanaka <shingo.fg8 <at> gmail.com>

Date: Sun, 24 Aug 2025 02:17:02 UTC

Severity: normal

Found in version 30.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Full log


View this message in rfc822 format

From: Shingo Tanaka <shingo.fg8 <at> gmail.com>
To: Bruno Haible <bruno <at> clisp.org>
Cc: 79296 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, corwin <at> bru.st, shingo.fg8 <at> gmail.com, eggert <at> cs.ucla.edu
Subject: bug#79296: 30.2; format-time-string returns wrongly encoded string in MS Windows Japanese with cp65001 beta config
Date: Wed, 27 Aug 2025 22:54:30 +0900
On Wed, 27 Aug 2025 18:05:42 +0900,
Bruno Haible wrote:
> 
> For producing such binaries with only Free Software (no MSVC compiler,
> no MSVC header files) one can use MSYS2. For a year or two already
> it supports two target environments:
>   - mingw-w64 with MSVCRT,
>   - mingw-w64 with UCRT.
> These two development environments are very similar, which means that
> the Makefile will need very few adapations.

I've just installed MSYS2 Emacs of UCRT version and run it with no init file. 

~> pacman -S mingw-w64-ucrt-x86_64-emacs
~> /ucrt64/bin/runemacs --no-init-file

And confirmed the issue I reported doesn't happen even with
"Beta: Use Unicode UTF-8 for worldwide language support" on.

In *scratch* buffer:

(format-time-string "%y,%d,%m %A" (date-to-time (concat "2025,1,Jan")))
"25,01,01 水曜日"

w32-system-coding-system
cp65001

w32-multibyte-code-page
0

w32-ansi-code-page
65001

(w32-get-current-locale-id)
1041

(w32-get-locale-info (w32-get-current-locale-id))
"JPN"

(w32-get-default-locale-id)
1041

(w32-get-locale-info (w32-get-default-locale-id))
"JPN"

(w32-get-console-codepage)
65001

(w32-get-console-output-codepage)
65001

Regards,
Shingo




This bug report was last modified 21 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.