GNU bug report logs - #19910
24.4; Japanese font names are decoded incorrectly in Cygwin's emacs-w32 in LANG=ja_JP.UTF-8

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Fujii Hironori <fujii.hironori@HIDDEN>; dated Fri, 20 Feb 2015 10:41:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 19910 <at> debbugs.gnu.org:


Received: (at 19910) by debbugs.gnu.org; 28 Feb 2015 12:14:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 28 07:14:19 2015
Received: from localhost ([127.0.0.1]:60422 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YRgHd-000306-Hk
	for submit <at> debbugs.gnu.org; Sat, 28 Feb 2015 07:14:19 -0500
Received: from mail-lb0-f170.google.com ([209.85.217.170]:44025)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <fujii.hironori@HIDDEN>) id 1YRgHW-0002zP-NJ
 for 19910 <at> debbugs.gnu.org; Sat, 28 Feb 2015 07:14:11 -0500
Received: by lbiw7 with SMTP id w7so21951044lbi.10
 for <19910 <at> debbugs.gnu.org>; Sat, 28 Feb 2015 04:14:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=ivR3eyKg8oCl0IC+7W/oW3P567QG9XxBthKZhcqtYRg=;
 b=sbh9Zk5vPRKExOtJ9KHJaDitYaKLCrKDWywfTPuXtO2TvX4ix5y9F7Qfi+G2lrTGe1
 wYyz4Wd9yG+zvbhvCvxmDDeaH/D2/qgVy2C9HlTyqkX/5/nUC6BmO6uaMQXmmj4FS+xs
 oV4/Ve+26NdomkhuPbiyVgfw4+IHACPEDaFU+jKor+SrZzyjcztfyU8OEbcBfwa5CL7N
 Up/eY8XcBSIwcY/dthQLS8UH2s9MdXpfWRL7Ca6Flg+t2uiO9IFxa69MEi1py76OG7ka
 YbV2i6R13s68QtBGbh/OoJGUew5KhfLL3OsDYp90K/S1S0ARZrr0NMVkedY32fyoPPv5
 Q4PA==
MIME-Version: 1.0
X-Received: by 10.112.141.225 with SMTP id rr1mr16465203lbb.71.1425125640701; 
 Sat, 28 Feb 2015 04:14:00 -0800 (PST)
Received: by 10.112.10.164 with HTTP; Sat, 28 Feb 2015 04:14:00 -0800 (PST)
In-Reply-To: <83y4nj49zx.fsf@HIDDEN>
References: <CALus1P=Sf5Z2Bw7ApqDqWJ+va+5Jtar4WiLjbBv_nhjOOLX7nQ@HIDDEN>
 <83h9ugltg1.fsf@HIDDEN>
 <CALus1Pk81J0O=TYZYP7PwDNb8Qwk3UQ_3Pyw3aYJvO4A8NiAYw@HIDDEN>
 <83y4nj49zx.fsf@HIDDEN>
Date: Sat, 28 Feb 2015 21:14:00 +0900
Message-ID: <CALus1PkfjTojw-JqBeHkpg5hSTyo0g9i_VdLb7kqZAcu4EyvLQ@HIDDEN>
Subject: Re: bug#19910: 24.4; Japanese font names are decoded incorrectly in
 Cygwin's emacs-w32 in LANG=ja_JP.UTF-8
From: Fujii Hironori <fujii.hironori@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19910
Cc: 19910 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Thank you for reviewing my patch, Eli.

On Sat, Feb 28, 2015 at 1:03 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
> However, this goes too far: there's no need to replace all the
> functions with "wide" versions, only those functions that return font
> name strings from the system.  For example, I don't think
> CreateFontIndirect needs to be switched to Unicode, does it?  And CRT
> functions like _wcslwr and swprintf that work on wchar_t arguments
> aren't supported on Windows 9X, AFAIK, so we cannot call them.  (One
> reason for using the minimum number of "wide" APIs is that we don't
> have good ways of testing the development code on Windows 9X.)

This is the code:

|    862  hfont = CreateFontIndirect (&logfont);
| (...)
|    912 = DECODE_SYSTEM (build_string (logfont.lfFaceName));

logfont.lfFaceName is ANSI text and DECODE_SYSTEM is the problem.
CreateFontIndirect should be wide.

> I would actually suggest to have a Cygwin-only branches of the code,
> where you can freely call the "wide" APIs without bothering about
> Windows 9X, since that's what the Cygwin-w32 build does elsewhere, and
> since this is a Cygwin-specific problem due to the difference between
> file-name encoding and the locale emulated by Cygwin.  There are a
> bunch of macros like GUI_STR and GUI_ENCODE_FILE near the end of
> w32term.h that can be used to minimize #ifdef's to the absolute
> minimum.

If this approach is used, structs such as LOGFONT and ENUMLOGFONTEX
should be ranemed to GUI_FN(LOGFONT) and GUI_FN(ENUMLOGFONTEX).
This looks ugly.

The best way to solve this is defining _UNICODE.
Defining _UNICODE is already filed, but closed as wontfix.

#265 - Build error with _UNICODE on w32. - GNU bug report logs
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=265

If Bug#265 is resolved, this bug (Bug#19910) will be resolved automatically.
And, _UNICODE macro can be used not only for Cygwin, but also NTEmacs.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19910; Package emacs. Full text available.

Message received at 19910 <at> debbugs.gnu.org:


Received: (at 19910) by debbugs.gnu.org; 27 Feb 2015 16:03:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 27 11:03:38 2015
Received: from localhost ([127.0.0.1]:60118 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YRNO5-00066q-SB
	for submit <at> debbugs.gnu.org; Fri, 27 Feb 2015 11:03:38 -0500
Received: from mtaout21.012.net.il ([80.179.55.169]:51065)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1YRNO3-00066c-LV
 for 19910 <at> debbugs.gnu.org; Fri, 27 Feb 2015 11:03:37 -0500
Received: from conversion-daemon.a-mtaout21.012.net.il by
 a-mtaout21.012.net.il (HyperSendmail v2007.08) id
 <0NKF00D00TWIGO00@HIDDEN> for 19910 <at> debbugs.gnu.org;
 Fri, 27 Feb 2015 18:03:28 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NKF00DO3TXSDN80@HIDDEN>;
 Fri, 27 Feb 2015 18:03:28 +0200 (IST)
Date: Fri, 27 Feb 2015 18:03:46 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19910: 24.4;
 Japanese font names are decoded incorrectly in Cygwin's emacs-w32 in
 LANG=ja_JP.UTF-8
In-reply-to: <CALus1Pk81J0O=TYZYP7PwDNb8Qwk3UQ_3Pyw3aYJvO4A8NiAYw@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Fujii Hironori <fujii.hironori@HIDDEN>
Message-id: <83y4nj49zx.fsf@HIDDEN>
References: <CALus1P=Sf5Z2Bw7ApqDqWJ+va+5Jtar4WiLjbBv_nhjOOLX7nQ@HIDDEN>
 <83h9ugltg1.fsf@HIDDEN>
 <CALus1Pk81J0O=TYZYP7PwDNb8Qwk3UQ_3Pyw3aYJvO4A8NiAYw@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19910
Cc: 19910 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Sat, 28 Feb 2015 00:22:00 +0900
> From: Fujii Hironori <fujii.hironori@HIDDEN>
> Cc: 19910 <at> debbugs.gnu.org
> 
> On Fri, Feb 20, 2015 at 8:21 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
> > The problem is in w32font.c: it should call the "wide" (a.k.a.
> > "Unicode") APIs, and then decode strings using utf-16le, like we do in
> > w32fns.c with encoding strings we pass to w32 GUI APIs.
> 
> Unicode API patch is attached. Could you review it?
> Should I use GetProcAddress for Windows 9x?

Thanks.

However, this goes too far: there's no need to replace all the
functions with "wide" versions, only those functions that return font
name strings from the system.  For example, I don't think
CreateFontIndirect needs to be switched to Unicode, does it?  And CRT
functions like _wcslwr and swprintf that work on wchar_t arguments
aren't supported on Windows 9X, AFAIK, so we cannot call them.  (One
reason for using the minimum number of "wide" APIs is that we don't
have good ways of testing the development code on Windows 9X.)

And yes, for Windows 9X you will need to call these functions through
function pointers, after assigning them with GetProcAddress, as
w32font.c does elsewhere.

I would actually suggest to have a Cygwin-only branches of the code,
where you can freely call the "wide" APIs without bothering about
Windows 9X, since that's what the Cygwin-w32 build does elsewhere, and
since this is a Cygwin-specific problem due to the difference between
file-name encoding and the locale emulated by Cygwin.  There are a
bunch of macros like GUI_STR and GUI_ENCODE_FILE near the end of
w32term.h that can be used to minimize #ifdef's to the absolute
minimum.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19910; Package emacs. Full text available.

Message received at 19910 <at> debbugs.gnu.org:


Received: (at 19910) by debbugs.gnu.org; 27 Feb 2015 15:22:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 27 10:22:12 2015
Received: from localhost ([127.0.0.1]:60113 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YRMjz-00059B-0Y
	for submit <at> debbugs.gnu.org; Fri, 27 Feb 2015 10:22:12 -0500
Received: from mail-lb0-f174.google.com ([209.85.217.174]:38224)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <fujii.hironori@HIDDEN>) id 1YRMju-00058j-Od
 for 19910 <at> debbugs.gnu.org; Fri, 27 Feb 2015 10:22:08 -0500
Received: by lbiz11 with SMTP id z11so17984477lbi.5
 for <19910 <at> debbugs.gnu.org>; Fri, 27 Feb 2015 07:22:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=N6hnlUmpMRsqp+aC1SHJwVP3A3HhOJzHY+0fV8V6jvA=;
 b=cCbzZnn4WMBymFUqDy5yn36QZWVCBJZSa3qs6cF6pS2b25ejWeBP5Th2lyclnfC9G2
 G2L0RMvDh9vxnkWMSC6SMlvLn9Bs4eO/u27Ikps0guALqc1pU3KiywVzthCelH4e3gBL
 CnGYkN/4t+q5sJCOQIaBU23a6asQ+2zTi2dv3U5Hvrb0X/q3isnRp+UjT+cxbtkugh55
 z1A9sTesYNP0CWNCFNWkb3VMy2ayh3BS/2P0Pnfluwirx++GpIu8zr4LTkJU9uiVeusw
 XRLNd76I0OdvQlnIDIiF8Aol118fUd73INRDjniZgeiL9rblIFjZfjNRIbxUvI6nXAk2
 fwNQ==
MIME-Version: 1.0
X-Received: by 10.112.12.98 with SMTP id x2mr13035339lbb.3.1425050520744; Fri,
 27 Feb 2015 07:22:00 -0800 (PST)
Received: by 10.112.10.164 with HTTP; Fri, 27 Feb 2015 07:22:00 -0800 (PST)
In-Reply-To: <83h9ugltg1.fsf@HIDDEN>
References: <CALus1P=Sf5Z2Bw7ApqDqWJ+va+5Jtar4WiLjbBv_nhjOOLX7nQ@HIDDEN>
 <83h9ugltg1.fsf@HIDDEN>
Date: Sat, 28 Feb 2015 00:22:00 +0900
Message-ID: <CALus1Pk81J0O=TYZYP7PwDNb8Qwk3UQ_3Pyw3aYJvO4A8NiAYw@HIDDEN>
Subject: Re: bug#19910: 24.4; Japanese font names are decoded incorrectly in
 Cygwin's emacs-w32 in LANG=ja_JP.UTF-8
From: Fujii Hironori <fujii.hironori@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/mixed; boundary=001a11c39ea813ce720510136e60
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19910
Cc: 19910 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a11c39ea813ce720510136e60
Content-Type: text/plain; charset=UTF-8

Tags: patch

On Fri, Feb 20, 2015 at 8:21 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
> The problem is in w32font.c: it should call the "wide" (a.k.a.
> "Unicode") APIs, and then decode strings using utf-16le, like we do in
> w32fns.c with encoding strings we pass to w32 GUI APIs.

Unicode API patch is attached. Could you review it?
Should I use GetProcAddress for Windows 9x?

--001a11c39ea813ce720510136e60
Content-Type: text/x-patch; charset=US-ASCII; name="font.patch"
Content-Disposition: attachment; filename="font.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_i6nq8wfp0

ZGlmZiAtLWdpdCBhL3NyYy93MzJmb250LmMgYi9zcmMvdzMyZm9udC5jCmluZGV4IDQyMmYwODIu
LjYzMWNlY2YgMTAwNjQ0Ci0tLSBhL3NyYy93MzJmb250LmMKKysrIGIvc3JjL3czMmZvbnQuYwpA
QCAtMTksNiArMTksNyBAQCBhbG9uZyB3aXRoIEdOVSBFbWFjcy4gIElmIG5vdCwgc2VlIDxodHRw
Oi8vd3d3LmdudS5vcmcvbGljZW5zZXMvPi4gICovCiAjaW5jbHVkZSA8Y29uZmlnLmg+CiAjaW5j
bHVkZSA8d2luZG93cy5oPgogI2luY2x1ZGUgPHN0ZGlvLmg+CisjaW5jbHVkZSA8d2NoYXIuaD4K
ICNpbmNsdWRlIDxtYXRoLmg+CiAjaW5jbHVkZSA8Y3R5cGUuaD4KICNpbmNsdWRlIDxjb21tZGx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KLSAgY2hlY2tfZm9udCA9IENyZWF0ZUZv
bnRJbmRpcmVjdCAoZm9udCk7CisgIGNoZWNrX2ZvbnQgPSBDcmVhdGVGb250SW5kaXJlY3RXIChm
b250KTsKICAgb2xkX2ZvbnQgPSBTZWxlY3RPYmplY3QgKGNvbnRleHQsIGNoZWNrX2ZvbnQpOwog
CiAgIC8qIEV2ZXJ5dGhpbmcgZWxzZSBpcyBjb250YWluZWQgd2l0aGluIG90Zl9zcGVjIHNvIHNo
b3VsZCBnZXQK
--001a11c39ea813ce720510136e60--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19910; Package emacs. Full text available.

Message received at 19910 <at> debbugs.gnu.org:


Received: (at 19910) by debbugs.gnu.org; 20 Feb 2015 11:21:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 20 06:21:07 2015
Received: from localhost ([127.0.0.1]:49183 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YOldq-0005m3-Fv
	for submit <at> debbugs.gnu.org; Fri, 20 Feb 2015 06:21:06 -0500
Received: from mtaout22.012.net.il ([80.179.55.172]:35889)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1YOldn-0005lu-Lx
 for 19910 <at> debbugs.gnu.org; Fri, 20 Feb 2015 06:21:04 -0500
Received: from conversion-daemon.a-mtaout22.012.net.il by
 a-mtaout22.012.net.il (HyperSendmail v2007.08) id
 <0NK200G00HHX0500@HIDDEN> for 19910 <at> debbugs.gnu.org;
 Fri, 20 Feb 2015 13:21:02 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NK200G0QI712G00@HIDDEN>;
 Fri, 20 Feb 2015 13:21:02 +0200 (IST)
Date: Fri, 20 Feb 2015 13:21:18 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19910: 24.4;
 Japanese font names are decoded incorrectly in Cygwin's emacs-w32
 in	LANG=ja_JP.UTF-8
In-reply-to: <CALus1P=Sf5Z2Bw7ApqDqWJ+va+5Jtar4WiLjbBv_nhjOOLX7nQ@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Fujii Hironori <fujii.hironori@HIDDEN>
Message-id: <83h9ugltg1.fsf@HIDDEN>
References: <CALus1P=Sf5Z2Bw7ApqDqWJ+va+5Jtar4WiLjbBv_nhjOOLX7nQ@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19910
Cc: 19910 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Fri, 20 Feb 2015 19:39:55 +0900
> From: Fujii Hironori <fujii.hironori@HIDDEN>
> 
> (font-family-list) returns incorrectly decoded Japanese font names.
> My locale-coding-system is utf-8-unix.
> 
> If I do (setq locale-coding-system 'cp932), it returns correct font names.
> But, locale-coding-system is used in other places (e.g. M-x term and M-x man).
> locale-coding-system must be utf-8 in my Emacs.

The problem is in w32font.c: it should call the "wide" (a.k.a.
"Unicode") APIs, and then decode strings using utf-16le, like we do in
w32fns.c with encoding strings we pass to w32 GUI APIs.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19910; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 20 Feb 2015 10:40:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 20 05:40:06 2015
Received: from localhost ([127.0.0.1]:49169 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YOl09-0004pR-Sg
	for submit <at> debbugs.gnu.org; Fri, 20 Feb 2015 05:40:06 -0500
Received: from eggs.gnu.org ([208.118.235.92]:60486)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <fujii.hironori@HIDDEN>) id 1YOl08-0004pJ-3O
 for submit <at> debbugs.gnu.org; Fri, 20 Feb 2015 05:40:04 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <fujii.hironori@HIDDEN>) id 1YOl03-0001Jr-Q6
 for submit <at> debbugs.gnu.org; Fri, 20 Feb 2015 05:40:03 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:39519)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <fujii.hironori@HIDDEN>) id 1YOl03-0001Jm-NS
 for submit <at> debbugs.gnu.org; Fri, 20 Feb 2015 05:39:59 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33928)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <fujii.hironori@HIDDEN>) id 1YOl02-0005SU-IY
 for bug-gnu-emacs@HIDDEN; Fri, 20 Feb 2015 05:39:59 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <fujii.hironori@HIDDEN>) id 1YOl01-0001Ip-Ey
 for bug-gnu-emacs@HIDDEN; Fri, 20 Feb 2015 05:39:58 -0500
Received: from mail-lb0-x235.google.com ([2a00:1450:4010:c04::235]:36318)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <fujii.hironori@HIDDEN>) id 1YOl01-0001IR-3i
 for bug-gnu-emacs@HIDDEN; Fri, 20 Feb 2015 05:39:57 -0500
Received: by lbvp9 with SMTP id p9so5464082lbv.3
 for <bug-gnu-emacs@HIDDEN>; Fri, 20 Feb 2015 02:39:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:date:message-id:subject:from:to:content-type;
 bh=4/H0fjoynhn90i0Jzg6xI0alXpMsm525Tf7Fe7u8XRw=;
 b=dEIQLiHCzxPcOrezjnLEbhLjcYnNvYHuJLm5B+2pX2UMLA+RKqLvdaLchbstz1U/cg
 3hXe9tFj4nx2q8EZS3Xlrq0wXB/n3TwAvZOL+oZnzEeIq0mxqm9UR6EfqH764B7Skmix
 r0/VrG7hdiI/NB+M+kzH0iMvtmUVxzI4W7ldTQk3+nYSZkKo2v6KJWq+k1N13hHnQdGs
 YfeSRqLKr+oGIW+cfDWw1L4NDY3Krl31wAynbYL7vhoLA3GUBq0JO7ItQlN1fHLbe1CC
 jRwABFiRD1DdUrhnxn49aeD15YWz2CGB3RexS6sS4EInhTjkY5/aqmKxKLdlJl/RzjoX
 RfgQ==
MIME-Version: 1.0
X-Received: by 10.112.24.235 with SMTP id x11mr1839127lbf.18.1424428795625;
 Fri, 20 Feb 2015 02:39:55 -0800 (PST)
Received: by 10.112.64.42 with HTTP; Fri, 20 Feb 2015 02:39:55 -0800 (PST)
Date: Fri, 20 Feb 2015 19:39:55 +0900
Message-ID: <CALus1P=Sf5Z2Bw7ApqDqWJ+va+5Jtar4WiLjbBv_nhjOOLX7nQ@HIDDEN>
Subject: 24.4; Japanese font names are decoded incorrectly in Cygwin's
 emacs-w32 in LANG=ja_JP.UTF-8
From: Fujii Hironori <fujii.hironori@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

(font-family-list) returns incorrectly decoded Japanese font names.
My locale-coding-system is utf-8-unix.

If I do (setq locale-coding-system 'cp932), it returns correct font names.
But, locale-coding-system is used in other places (e.g. M-x term and M-x man).
locale-coding-system must be utf-8 in my Emacs.



In GNU Emacs 24.4.1 (x86_64-unknown-cygwin)
 of 2015-02-13 on desktop-new
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure
 --srcdir=/home/kbrown/src/cygemacs/emacs-24.4-3.x86_64/src/emacs-24.4
 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
 --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var
 --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share
 --docdir=/usr/share/doc/emacs --htmldir=/usr/share/doc/emacs/html -C
 --with-w32 'CFLAGS=-ggdb -O2 -pipe -Wimplicit-function-declaration
 -fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.4-3.x86_64/build=/usr/src/debug/emacs-24.4-3
 -fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.4-3.x86_64/src/emacs-24.4=/usr/src/debug/emacs-24.4-3'
 CPPFLAGS= LDFLAGS='

Important settings:
  value of $LANG: ja_JP.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<language-change> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar>
<help-menu> <send-emacs-bug-report>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
No docstring slot for setup-japanese-environment-internal

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils time-date japan-util tooltip
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify w32 multi-tty emacs)

Memory information:
((conses 16 76005 6531)
 (symbols 48 17442 0)
 (miscs 40 60 88)
 (strings 32 10617 5193)
 (string-bytes 1 268020)
 (vectors 16 9545)
 (vector-slots 8 454592 39464)
 (floats 8 57 94)
 (intervals 56 193 0)
 (buffers 960 12))




Acknowledgement sent to Fujii Hironori <fujii.hironori@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#19910; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 28 Feb 2015 12:30:03 UTC

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