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 #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Emacs bug reports and feature requests <bug-gnu-emacs <at> gnu.org>
Subject: po-mode mishandles ASCII files
Date: Sun, 27 Sep 2015 13:01:22 -0700
[Message part 1 (text/plain, inline)]
Emacs's po-mode mishandles .po files that specify charset=us-ascii.  To 
reproduce the problem on Fedora, run 'LC_ALL=cs_CZ.iso88592 emacs -Q fr.po' with 
fr.po being the attached file (taken from Texinfo 6.0), and type '# C-x 8 RET 
161 RET RET C-x C-s'.  The file will be saved with the line '#š' prepended, in 
Latin-2 encoding, even though the file declares its encoding to be 
charset=us-ascii.  If I visit the modified file again with 
'LC_ALL=fr_FR.iso88591 emacs -Q fr.po' I will see a first line of '#¹'.  This 
example is merely of a bad comment, but I suppose this could lead to a bad 
translation.

It's only a minor problem, as .po files should be using UTF-8 nowadays instead 
of US-ASCII.  I'm reporting it only because I suppose the bug could be more 
general than just po-mode.
[fr.po (text/x-gettext-translation, attachment)]

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

Previous Next


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