From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20707: [PROPOSED PATCH] Use curved quoting in C-generated errors Date: Mon, 01 Jun 2015 17:34:17 +0300 Message-ID: <83bngzts46.fsf@gnu.org> References: <1433144361-9424-1-git-send-email-eggert@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1433169323 15917 80.91.229.3 (1 Jun 2015 14:35:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Jun 2015 14:35:23 +0000 (UTC) Cc: 20707@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 01 16:35:12 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 1YzQo4-0001Qs-Lc for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Jun 2015 16:35:12 +0200 Original-Received: from localhost ([::1]:52779 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzQo4-0003lk-7Y for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Jun 2015 10:35:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzQo1-0003lV-8f for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 10:35:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzQnv-0000hW-K8 for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 10:35:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzQnv-0000hM-HN for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 10:35:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YzQnv-00015X-5C for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 10:35:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Jun 2015 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20707 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 20707-submit@debbugs.gnu.org id=B20707.14331692804149 (code B ref 20707); Mon, 01 Jun 2015 14:35:02 +0000 Original-Received: (at 20707) by debbugs.gnu.org; 1 Jun 2015 14:34:40 +0000 Original-Received: from localhost ([127.0.0.1]:36255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzQnX-00014r-Iw for submit@debbugs.gnu.org; Mon, 01 Jun 2015 10:34:39 -0400 Original-Received: from mtaout27.012.net.il ([80.179.55.183]:59563) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzQnU-00014b-SX for 20707@debbugs.gnu.org; Mon, 01 Jun 2015 10:34:37 -0400 Original-Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NP900I00S4QRD00@mtaout27.012.net.il> for 20707@debbugs.gnu.org; Mon, 01 Jun 2015 17:29:46 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NP900HAPS9M8020@mtaout27.012.net.il>; Mon, 01 Jun 2015 17:29:46 +0300 (IDT) In-reply-to: <1433144361-9424-1-git-send-email-eggert@cs.ucla.edu> X-012-Sender: halo1@inter.net.il 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:103431 Archived-At: > From: Paul Eggert > Date: Mon, 1 Jun 2015 00:39:21 -0700 > Cc: Paul Eggert > > Quote with curved single quotes, ‘like this’, in diagnostics > generated from C code. This mostly uses C11-style UTF-8 strings, > e.g., u8"quote ‘like this’", with a backward compatibility macro > u8 for pre-C11 compilers. Thanks. I see a couple of potential issues with these changes: . They use UTF-8 encoded characters, and so will require a suitable 'coding:' cookie in the affected files, or some equivalent setting (perhaps in .dir-locals.el?), otherwise they might not be decoded correctly in non-UTF-8 locales. Doing so might remove at least part of the need for using the u8 qualifier, I think. . I think these strings will have to be decoded before they are passed to 'error', as we never pass any unibyte strings to Lisp interfaces without decoding them first. (We never used before any non-ASCII characters in messages created by C sources, so this issue never arose until now.) Doing so would also remove the need for using the u8 qualifier, I think. . 'error' calls 'verror', which calls 'make_string' to actually produce the message string. However, 'make_string' is not reliable enough wrt whether it produces unibyte or multibyte strings, so I suggest to make sure we produce a multibyte string from these error messages.