From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fujii Hironori Newsgroups: gmane.emacs.bugs Subject: bug#19910: 24.4; Japanese font names are decoded incorrectly in Cygwin's emacs-w32 in LANG=ja_JP.UTF-8 Date: Sat, 28 Feb 2015 21:14:00 +0900 Message-ID: References: <83h9ugltg1.fsf@gnu.org> <83y4nj49zx.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1425125723 14816 80.91.229.3 (28 Feb 2015 12:15:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Feb 2015 12:15:23 +0000 (UTC) Cc: 19910@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 28 13:15:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YRgIZ-0008Sp-VE for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Feb 2015 13:15:12 +0100 Original-Received: from localhost ([::1]:40918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRgIY-0003mB-Vk for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Feb 2015 07:15:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRgIV-0003ho-8m for bug-gnu-emacs@gnu.org; Sat, 28 Feb 2015 07:15:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YRgIS-0008CI-1P for bug-gnu-emacs@gnu.org; Sat, 28 Feb 2015 07:15:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRgIR-0008Bm-Um for bug-gnu-emacs@gnu.org; Sat, 28 Feb 2015 07:15:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YRgIR-00031Y-IZ for bug-gnu-emacs@gnu.org; Sat, 28 Feb 2015 07:15:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Fujii Hironori Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Feb 2015 12:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19910 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19910-submit@debbugs.gnu.org id=B19910.142512565911548 (code B ref 19910); Sat, 28 Feb 2015 12:15:03 +0000 Original-Received: (at 19910) by debbugs.gnu.org; 28 Feb 2015 12:14:19 +0000 Original-Received: from localhost ([127.0.0.1]:60422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YRgHd-000306-Hk for submit@debbugs.gnu.org; Sat, 28 Feb 2015 07:14:19 -0500 Original-Received: from mail-lb0-f170.google.com ([209.85.217.170]:44025) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YRgHW-0002zP-NJ for 19910@debbugs.gnu.org; Sat, 28 Feb 2015 07:14:11 -0500 Original-Received: by lbiw7 with SMTP id w7so21951044lbi.10 for <19910@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== X-Received: by 10.112.141.225 with SMTP id rr1mr16465203lbb.71.1425125640701; Sat, 28 Feb 2015 04:14:00 -0800 (PST) Original-Received: by 10.112.10.164 with HTTP; Sat, 28 Feb 2015 04:14:00 -0800 (PST) In-Reply-To: <83y4nj49zx.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99896 Archived-At: Thank you for reviewing my patch, Eli. On Sat, Feb 28, 2015 at 1:03 AM, Eli Zaretskii 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.