From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Coding system robustness? Date: Fri, 18 Mar 2005 13:11:43 -0500 Message-ID: <87wts43jxx.fsf-monnier+emacs@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1111170010 15585 80.91.229.2 (18 Mar 2005 18:20:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 Mar 2005 18:20:10 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 18 19:20:09 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DCM4K-00013b-Fk for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2005 19:19:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DCMKr-0008JG-NF for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2005 13:36:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DCMHS-00058m-26 for emacs-devel@gnu.org; Fri, 18 Mar 2005 13:33:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DCMHN-00055I-IT for emacs-devel@gnu.org; Fri, 18 Mar 2005 13:33:03 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DCMHL-00052L-MG for emacs-devel@gnu.org; Fri, 18 Mar 2005 13:33:00 -0500 Original-Received: from [209.226.175.4] (helo=tomts16-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DCLwn-0003rr-LV; Fri, 18 Mar 2005 13:11:45 -0500 Original-Received: from alfajor ([67.68.217.141]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050318181145.FAKR1836.tomts16-srv.bellnexxia.net@alfajor>; Fri, 18 Mar 2005 13:11:45 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id 2EB4CD7383; Fri, 18 Mar 2005 13:11:44 -0500 (EST) Original-To: David Kastrup In-Reply-To: (David Kastrup's message of "Fri, 18 Mar 2005 18:45:42 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34733 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34733 > 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, although IIRC some bugs were found in this area and fixed in Emacs-CVS (maybe for utf-8), but my memory is fuzzy. Stefan