GNU bug report logs -
#12693
[cygwin] Setting fonts with non-ascii names throws error
Previous Next
Full log
Message #17 received at 12693 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 23 Oct 2012 22:05:46 +0900
> From: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
> Cc: 12693 <at> debbugs.gnu.org
>
> On Cygwin, locale-coding-system's value depends on its environment.
> For example,
>
> $ env LANG=ja_JP.CP932 emacs --batch --eval '(princ locale-coding-system)'
> -> japanese-cp932-unix
>
> $ env LANG=ja_JP.UTF-8 emacs --batch --eval '(princ locale-coding-system)'
> -> utf-8-unix
This is not necessarily relevant to Emacs, or at least doesn't provide
a definitive answer to the question what encoding should ENCODE_SYSTEM
use in the cygw32 build, which is a kind of androgen wrt encoding and
decoding issues.
There are several places where this issue might (or will) pop up:
. decoding keyboard key events
. encoding and decoding file names
. encoding strings passed to various non-file APIs, like the one you
mentioned
At least the first 2 items use different single-byte encoding in the
GUI and the console frames.
Someone(TM) should analyze all these and come up with recommendations
whether cygw32 should cater to the normal Cygwin locale, or maybe for
practical reasons it should do something else.
> Please try the below code (cygwin, locale is ja_JP.UTF-8).
>
> (list
> locale-coding-system
> (let ((locale-coding-system 'utf-8))
> (format-time-string "%c"))
> (let ((locale-coding-system 'cp932))
> (format-time-string "%c")))
This is but one example. As you yourself found out, this encoding is
unsuitable for the font interface.
> At present, locale-coding-system has to be ANSI code page for
> (w32-select-font)
So maybe we need w32-select-font to use UTF-16 in the cygw32 case, as
it does for menus.
> The cause is that we use two kinds of system calls, Windows's API
> and Cygwin's API (may three, if we count Windows's Unicode API).
See above: there's much more than just 3.
This bug report was last modified 4 years and 191 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.