From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master db828f6: Don't rely on defaults in decoding UTF-8 encoded Lisp files Date: Sun, 27 Sep 2015 13:36:08 +0300 Message-ID: <837fncf8tj.fsf@gnu.org> References: <20150921165211.20434.28114@vcs.savannah.gnu.org> <83fv27mt7r.fsf@gnu.org> <83wpvfix7i.fsf@gnu.org> <83fv23hr0z.fsf@gnu.org> <5605CB6B.4000102@cs.ucla.edu> <83twqhhf0g.fsf@gnu.org> <5606AC48.7090801@cs.ucla.edu> <83zj09fbzp.fsf@gnu.org> <5606C140.6090309@cs.ucla.edu> <878u7trwlb.fsf@fencepost.gnu.org> <5606E995.2000102@cs.ucla.edu> <83si61ezxd.fsf@gnu.org> <560700E1.4010403@cs.ucla.edu> <83pp14fhj5.fsf@gnu.org> <5607A758.4020205@cs.ucla.edu> <87r3lkp48y.fsf@fencepost.gnu.org> <838u7sf9ql.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1443350196 21273 80.91.229.3 (27 Sep 2015 10:36:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Sep 2015 10:36:36 +0000 (UTC) Cc: emacs-devel@gnu.org, dak@gnu.org, schwab@linux-m68k.org, monnier@iro.umontreal.ca, eggert@cs.ucla.edu To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 27 12:36:26 2015 Return-path: Envelope-to: ged-emacs-devel@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 1Zg9JW-0007RD-1a for ged-emacs-devel@m.gmane.org; Sun, 27 Sep 2015 12:36:14 +0200 Original-Received: from localhost ([::1]:56894 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zg9JV-0002IH-Kk for ged-emacs-devel@m.gmane.org; Sun, 27 Sep 2015 06:36:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zg9JR-0002Df-6S for emacs-devel@gnu.org; Sun, 27 Sep 2015 06:36:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zg9JQ-0002MU-3U for emacs-devel@gnu.org; Sun, 27 Sep 2015 06:36:09 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:36893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zg9JJ-0002LK-Cx; Sun, 27 Sep 2015 06:36:01 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NVB00A00ZQBWZ00@a-mtaout20.012.net.il>; Sun, 27 Sep 2015 13:36:00 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NVC00AM103ZSF40@a-mtaout20.012.net.il>; Sun, 27 Sep 2015 13:36:00 +0300 (IDT) In-reply-to: <838u7sf9ql.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:190407 Archived-At: > Date: Sun, 27 Sep 2015 13:16:18 +0300 > From: Eli Zaretskii > Cc: eggert@cs.ucla.edu, schwab@linux-m68k.org, monnier@iro.umontrea= l.ca, > =09emacs-devel@gnu.org >=20 > > From: David Kastrup > > Cc: Paul Eggert , Eli Zaretskii , monnier@iro.umontreal.ca, emacs-devel@gnu.org > > Date: Sun, 27 Sep 2015 12:04:45 +0200 > >=20 > > Andreas Schwab writes: > >=20 > > > Paul Eggert writes: > > > > > >> Yes, and those files are a pain to look at with Emacs now, sin= ce it > > >> typically misguesses their encodings. Presumably Emacs should= be looking > > >> at .po files' charset=3D decorations. > > > > > > It does already if you use the po-mode distributed with gettext= . > >=20 > > gettext being the standard GNU i18n mechanism, wouldn't it make s= ense to > > keep the latest version distributed with Emacs rather than requir= ing > > users to manually install them? >=20 > We discussed that at some point in the past. I don't remember why = we > decided not to do that, but a search in the archives might tell. > Maybe those reasons are no longer relevant. I've misremembered. The discussion is here: http://lists.gnu.org/archive/html/emacs-devel/2002-03/msg00167.html and, more importantly, its result is already in Emacs: file-coding-system-alist is a variable defined in =E2=80=98C source c= ode=E2=80=99. Its value is shown below. [...] Value: (("\\.dz\\'" no-conversion . no-conversion) ("\\.txz\\'" no-conversion . no-conversion) ("\\.xz\\'" no-conversion . no-conversion) ("\\.lzma\\'" no-conversion . no-conversion) ("\\.lz\\'" no-conversion . no-conversion) ("\\.g?z\\'" no-conversion . no-conversion) ("\\.\\(?:tgz\\|svgz\\|sifz\\)\\'" no-conversion . no-conversion) ("\\.tbz2?\\'" no-conversion . no-conversion) ("\\.bz2\\'" no-conversion . no-conversion) ("\\.Z\\'" no-conversion . no-conversion) ("\\.elc\\'" . utf-8-emacs) ("\\.el\\'" . prefer-utf-8) ("\\.utf\\(-8\\)?\\'" . utf-8) ("\\.xml\\'" . xml-find-file-coding-system) ("\\(\\`\\|/\\)loaddefs.el\\'" raw-text . raw-text-unix) ("\\.tar\\'" no-conversion . no-conversion) ("\\.po[tx]?\\'\\|\\.po\\." . po-find-file-coding-system) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ("\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'" . latexenc-find-file-coding-sys= tem) ("" undecided)) And the bundled po.el already defines po-find-file-coding-system. So it sounds like we simply have a bug here. But once again, the handling of *.po files is not the issue here. Th= e issue is whether we can ignore the possibility of non-UTF-8 encodings in locales whose codeset is not UTF-8.