bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs 21.1 writes invalidly encoded ISO-2022-JP-2 files


From: Bruno Haible
Subject: emacs 21.1 writes invalidly encoded ISO-2022-JP-2 files
Date: Fri, 22 Feb 2002 13:49:58 +0100 (CET)

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.1.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2001-10-28 on linuix
configured using `configure  --prefix=/packages/gnu'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: POSIX
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I started editing an ASCII file, adding several ISO-8859-1:GR
characters and copy&pasting from xterm a Unicode arrow character
(produced via "/usr/bin/printf '\u2191'"). When saving the file, emacs
told me that the encoding mule-utf-8-unix was not suitable for the
file contents (very astonishing and inconvenient). So I chose to save
in iso-2022-jp-2, and then attempted to convert to UTF-8 using GNU
libiconv's "iconv" program. It failed:

$ iconv -f ISO-2022-JP-2 -t UTF-8 < de.po > /dev/null 
iconv: (stdin): cannot convert

$ iconv --version
iconv (GNU libiconv 1.7)
Copyright (C) 2000-2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Bruno Haible.

The reason is that the saved file (de.po, attached) is in fact
invalid. It contains in line 22 a G2 designation for ISO-8859-1 (ESC
. A) and a use of it (ESC N ;), and later in line 27 a use of G2 (ESC
N ;) without prior designation on the same line. But the document
which defines ISO-2022-JP-2, RFC 1554, says:

   At the beginning of a line, information on G2 designation of the
   previous line is cleared.  New designation must be given before a
   character in 96 character sets is used in the line.


Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<menu-bar> <help-menu> <report-emacs-bug>

Recent messages:
(emacs)
Loading disp-table...done
Loading tool-bar...done
Loading image...done
Loading tooltip...done
Loading cl-indent...done
Loading derived...done
For information about the GNU Project and its goals, type C-h C-p.
Loading emacsbug...done

Attachment: de.po
Description: de.po


reply via email to

[Prev in Thread] Current Thread [Next in Thread]