From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.bugs Subject: bug#12055: 24.1.50; Characters "=?UTF-8?Q?=C3=A1?=" and "=?UTF-8?Q?=C3=A9?=" are not correctly displayed on a Windows terminal Date: Sat, 28 Jul 2012 00:46:08 +0800 Message-ID: <87hastywxb.fsf@gnu.org> References: <83vchajyb1.fsf@gnu.org> <83txwujwyg.fsf@gnu.org> <83pq7ijv9m.fsf@gnu.org> <83k3xqjnns.fsf@gnu.org> <83hastk8i1.fsf@gnu.org> <83d33hk212.fsf@gnu.org> <83zk6li6gd.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1343407692 24295 80.91.229.3 (27 Jul 2012 16:48:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 Jul 2012 16:48:12 +0000 (UTC) Cc: lekktu@gmail.com, 12055@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 27 18:48:11 2012 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 1Sunhy-0007YN-48 for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Jul 2012 18:48:10 +0200 Original-Received: from localhost ([::1]:50626 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sunhx-0000SV-HI for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Jul 2012 12:48:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sunhu-0000SC-Nl for bug-gnu-emacs@gnu.org; Fri, 27 Jul 2012 12:48:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sunht-00048X-9p for bug-gnu-emacs@gnu.org; Fri, 27 Jul 2012 12:48:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sunht-00048T-6N for bug-gnu-emacs@gnu.org; Fri, 27 Jul 2012 12:48:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Sunob-0003h4-WD for bug-gnu-emacs@gnu.org; Fri, 27 Jul 2012 12:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jason Rumney Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Jul 2012 16:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12055 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12055-submit@debbugs.gnu.org id=B12055.134340807514167 (code B ref 12055); Fri, 27 Jul 2012 16:55:01 +0000 Original-Received: (at 12055) by debbugs.gnu.org; 27 Jul 2012 16:54:35 +0000 Original-Received: from localhost ([127.0.0.1]:44348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SunoA-0003gS-IV for submit@debbugs.gnu.org; Fri, 27 Jul 2012 12:54:34 -0400 Original-Received: from mail-pb0-f44.google.com ([209.85.160.44]:42523) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Suno7-0003gJ-7k for 12055@debbugs.gnu.org; Fri, 27 Jul 2012 12:54:32 -0400 Original-Received: by pbcwy7 with SMTP id wy7so5244692pbc.3 for <12055@debbugs.gnu.org>; Fri, 27 Jul 2012 09:47:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=uwSj71d8kaQgnIb4qRwDhbmuXr/a6NcGlxZSnSaVrVQ=; b=r6Wb55/fE7OJrAqCRj9YkfkwRunPQe660YS6IonuNSBFZw5cbnGxdvbiT2jt0u+LM8 0s8+6OpcT7/u0t1dvNLNW2oppwCxt3/LvWBVU5ZE8AzTgCZYVEYaylNLv/01U90yUVhk odFryqj+zkWF/oVY8DGrkEaGhbBIafRBFX4/aqm2JxtSvbuLS0DZ0YSC76F8cWBDCNrK W+uc5ZBo7+Q0x7yK+REvYIFv4TVyVU/BU2Vo7Kmmuw+IynT5iau+e8S9afVx5rcAciCx Se/skno7A+l3kHglK5ubf/kT456OWzoU1VGZfaEYD2rqNi4Dd39GuUxLPnVBxLUUKyGC kdDw== Original-Received: by 10.68.221.74 with SMTP id qc10mr15435564pbc.31.1343407653062; Fri, 27 Jul 2012 09:47:33 -0700 (PDT) Original-Received: from home.jasonrumney.net ([180.75.106.197]) by mx.google.com with ESMTPS id gf3sm2203560pbc.74.2012.07.27.09.47.10 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Jul 2012 09:47:31 -0700 (PDT) Original-Received: by home.jasonrumney.net (Postfix, from userid 1000) id 51CD329F6; Sat, 28 Jul 2012 00:46:09 +0800 (MYT) In-Reply-To: <83zk6li6gd.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 27 Jul 2012 18:12:18 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:62466 Archived-At: Eli Zaretskii writes: >> Date: Fri, 27 Jul 2012 12:04:57 +0300 >> From: Eli Zaretskii >> Cc: lekktu@gmail.com, 12055@debbugs.gnu.org >> >> > Date: Fri, 27 Jul 2012 10:35:53 +0200 >> > From: Dani Moncayo >> > Cc: lekktu@gmail.com, 12055@debbugs.gnu.org >> > >> > > Please try that in the non-GUI session where you first set the >> > > terminal coding-system to cp850. >> > >> > Ok. If I do: >> > 1. emacs -nw -Q >> > 2. C-x RET t cp850 RET >> > 3. Visit the test file. >> > >> > Then the file is corrrectly displayed. >> >> Thanks. If no one beats me to it, I will look into the input issue >> when I have time. > > Well, I see some strange stuff in the input processing. /* Get the codepage to interpret this key with. */ GetLocaleInfo (GetThreadLocale (), LOCALE_IDEFAULTANSICODEPAGE, cp, 20); cpId = atoi (cp); is quite suspicious. It appears in two places - one is a fallback for older versions of Windows that do not fully support Unicode, the other is more interesting for this case, as it is in the dead key handling, and from Juanma's description, a dead key is being used to input the problem characters. The above lines should probably be replaced with cpId = GetConsoleCP ();