emacs-devel
[Top][All Lists]
Advanced

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

Re: Coding system robustness?


From: Kenichi Handa
Subject: Re: Coding system robustness?
Date: Sat, 19 Mar 2005 10:08:16 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3.50 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, Stefan Monnier <address@hidden> writes:

>>  I'd like to know whether coding systems in general are supposed to be
>>  robust, meaning that decoding some random byte string into the coding
>>  system and reencoding it is guaranteed to deliver the same byte string
>>  again?

> AFAIK, (encode-coding-string (decode-coding-string STR 'foo) 'foo)
> should always return STR, otherwise it's a bug.
> With the introduction of eight-bit-*, this should be true of "all"
> coding-systems in Emacs-21,

No.  Redundant escape sequences in iso-2022 based coding
systems are just ignored.  For instance,

  (decode-coding-string "\e(J" 'iso-2022-jp) => ""

And we can't recover "\e(J" on encoding.

---
Ken'ichi HANDA
address@hidden






reply via email to

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