From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#30405: 26.0.91; Incorrect apostrophe translation in ImageMagick error message Date: Mon, 12 Feb 2018 20:21:21 +0200 Message-ID: <83a7weyspq.fsf@gnu.org> References: <874lmpzx1t.fsf@runbox.com> <87po5dczl1.fsf@users.sourceforge.net> <83tvup2q7u.fsf@gnu.org> <2061ef0c-de4d-d8c1-aea8-786223e59c7e@cs.ucla.edu> <83wozk1qsy.fsf@gnu.org> <8337271jz0.fsf@gnu.org> <83zi4fz91t.fsf@gnu.org> <3db2fa4f-fe6b-a5db-599e-b0bcd0b8511b@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1518460090 10366 195.159.176.226 (12 Feb 2018 18:28:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 12 Feb 2018 18:28:10 +0000 (UTC) Cc: gazally@runbox.com, 30405@debbugs.gnu.org, npostavs@users.sourceforge.net To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 12 19:28:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elIpd-00025Q-JO for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Feb 2018 19:28:01 +0100 Original-Received: from localhost ([::1]:36349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elIrf-0001BP-4X for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Feb 2018 13:30:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elIjs-0002Sb-Py for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2018 13:22:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elIjp-0002fo-RJ for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2018 13:22:04 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60333) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1elIjp-0002fk-Nr for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2018 13:22:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1elIjp-0005Nd-Ho for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2018 13:22:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Feb 2018 18:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30405 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30405-submit@debbugs.gnu.org id=B30405.151845970920663 (code B ref 30405); Mon, 12 Feb 2018 18:22:01 +0000 Original-Received: (at 30405) by debbugs.gnu.org; 12 Feb 2018 18:21:49 +0000 Original-Received: from localhost ([127.0.0.1]:39997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elIjd-0005NC-K6 for submit@debbugs.gnu.org; Mon, 12 Feb 2018 13:21:49 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elIjb-0005Mz-4a for 30405@debbugs.gnu.org; Mon, 12 Feb 2018 13:21:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elIjV-0002Nu-3V for 30405@debbugs.gnu.org; Mon, 12 Feb 2018 13:21:42 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elIjN-0002Ed-So; Mon, 12 Feb 2018 13:21:33 -0500 Original-Received: from [176.228.60.248] (port=2877 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1elIjN-00081U-CJ; Mon, 12 Feb 2018 13:21:33 -0500 In-reply-to: <3db2fa4f-fe6b-a5db-599e-b0bcd0b8511b@cs.ucla.edu> (message from Paul Eggert on Sun, 11 Feb 2018 12:36:47 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:143213 Archived-At: > Cc: npostavs@users.sourceforge.net, 30405@debbugs.gnu.org, gazally@runbox.com > From: Paul Eggert > Date: Sun, 11 Feb 2018 12:36:47 -0800 > > > emacs -Q > > M-x set-variable RET unibyte-display-via-language-environment RET t RET > > M-: (set-buffer-multibyte nil) RET > > C-q 0242 SPC > > > > This should display ¢. > > > > So I think we can get rid of making echo-area buffers unibyte, as long > > as we make sure that variable is nil (which it is by default). > > Getting rid of it sounds good, but why do we need to worry about > unibyte-display-via-language-environment? Because with your patch the following doesn't work as it did before: emacs -Q M-x set-variable RET unibyte-display-via-language-environment RET t RET M-: (set-buffer-multibyte nil) RET (defun foo () (interactive) (message "cannot ¢")) C-j M-x foo RET (To insert ¢, type "C-q 0242".) And the same if you replace 'message' with 'error'. With your patch, I see an octal escape, not ¢, i.e. the effect of unibyte-display-via-language-environment is lost. > And yet this patch works without worrying about > unibyte-display-via-language-environment, even if I run Emacs in a unibyte > locale like en_US.iso885915 (a practice that's no longer common). Whether the locale is unibyte or not is immaterial, because we use multibyte representation for Latin-N characters as well. What is important is to be in a unibyte buffer and display a message with non-ASCII bytes, while unibyte-display-via-language-environment is non-nil.