GNU bug report logs - #21574
Emacs mishandles ASCII .po files

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Sun, 27 Sep 2015 20:02:02 UTC

Severity: normal

Full log


Message #28 received at 21574 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 21574 <at> debbugs.gnu.org
Subject: Re: bug#21574: po-mode mishandles ASCII files
Date: Mon, 28 Sep 2015 07:55:12 -0700
On 09/28/2015 03:18 AM, Eli Zaretskii wrote:
> do we have a similar problem in other files that have entries in
> file-coding-system-alist, like XML files or LaTeX files?

Not with XML, because xml-find-file-coding-system only tries 
detect-coding-region.

But there is a problem with LaTeX.  For example, if I visit a file like 
this:

  \usepackage[ascii]{inputenc}
  hello

The default coding system for saving the buffer is us-ascii-unix, which 
is correct (and is better than what we get with .po files). But if I 
then insert a non-ASCII character, say á, and type C-x C-s, Emacs 
changes the coding system to utf-8-unix without asking and saves the 
file.  If I then revisit the file I get garbage: the á is decoded as two 
bytes and I see \303\241 on the screen.




This bug report was last modified 9 years and 319 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.