From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: unibyte<->multibyte conversion [Re: Emacs-diffs Digest, Vol 2, Issue 28] Date: Tue, 21 Jan 2003 08:01:35 +0200 (IST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200301210045.h0L0jS812745@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: main.gmane.org 1043129096 28438 80.91.224.249 (21 Jan 2003 06:04:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 21 Jan 2003 06:04:56 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18arWc-0007Nw-00 for ; Tue, 21 Jan 2003 07:04:42 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18arhp-0006b0-00 for ; Tue, 21 Jan 2003 07:16:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18arWg-0000oV-02 for emacs-devel@quimby.gnus.org; Tue, 21 Jan 2003 01:04:46 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18arVx-0000lN-00 for emacs-devel@gnu.org; Tue, 21 Jan 2003 01:04:01 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18arV0-0000gv-00 for emacs-devel@gnu.org; Tue, 21 Jan 2003 01:03:18 -0500 Original-Received: from is.elta.co.il ([199.203.121.2]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18arUV-0000eS-00 for emacs-devel@gnu.org; Tue, 21 Jan 2003 01:02:31 -0500 Original-Received: from is (is [199.203.121.2]) by is.elta.co.il (8.9.3/8.8.8) with SMTP id IAA09926; Tue, 21 Jan 2003 08:01:36 +0200 (IST) X-Sender: eliz@is Original-To: Stefan Monnier In-Reply-To: <200301210045.h0L0jS812745@rum.cs.yale.edu> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10925 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10925 On Mon, 20 Jan 2003, Stefan Monnier wrote: > > unibyte sequence (hex): 81 81 C0 C0 > > result of conversion display in multbyte buf= fer > > string-as-multibyte: 9E A1 81 C0 C0 \201=C0\300 > > string-make-multibyte: 9E A1 9E A1 81 C0 81 C0 \201\201=C0=C0 > > string-to-multibyte: 9E A1 9E A1 C0 C0 \201\201\300\300 > [...] > 3 - when called with a `raw-text' coding-system, decode-coding-string > returns a unibyte string I might be missing something, but I think you are wrong: the sequence "9E A1 9E A1 C0 C0" is _not_ a unibyte string. For example, "9E A1" is=20 the multibyte encoding of the 81 byte. > I think avoiding string-FOO-multibyte and using decode-coding-string > instead would make things a lot more clear. FWIW, I never use string-*-multibyte because I could never remember what=20 exactly does each variant do.