From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Coding system robustness? Date: Fri, 18 Mar 2005 19:33:46 +0100 Message-ID: References: <87wts43jxx.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1111171565 20587 80.91.229.2 (18 Mar 2005 18:46:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 Mar 2005 18:46:05 +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:46:05 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DCMTM-0004EP-5F for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2005 19:45:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DCMjt-0007ov-Km for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2005 14:02:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DCMjT-0007lc-Ma for emacs-devel@gnu.org; Fri, 18 Mar 2005 14:02:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DCMjQ-0007kU-U2 for emacs-devel@gnu.org; Fri, 18 Mar 2005 14:02:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DCMjQ-0007h8-PD for emacs-devel@gnu.org; Fri, 18 Mar 2005 14:02:00 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DCMIC-0005US-QD for emacs-devel@gnu.org; Fri, 18 Mar 2005 13:33:52 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1DCMIC-0002fd-9V; Fri, 18 Mar 2005 13:33:52 -0500 Original-To: Stefan Monnier In-Reply-To: <87wts43jxx.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 18 Mar 2005 13:11:43 -0500") 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:34738 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34738 Stefan Monnier 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, although IIRC some bugs were found in > this area and fixed in Emacs-CVS (maybe for utf-8), but my memory is > fuzzy. Ok, that means I'll go for it. I _know_ that XEmacs 21.4 is not robust in that manner, and maybe I'll provide some customizable workaround variable you can set to "raw-text" if necessary. But if you ask the XEmacs developers' opinion, they'll tell you that you are mad to use mule-ucs in XEmacs 21.4, anyway. Not that they could offer any alternatives right now. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum