From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: unibyte<->multibyte conversion [Re: Emacs-diffs Digest, Vol 2, Issue 28] Date: Tue, 21 Jan 2003 15:43:11 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200301210643.PAA02999@etlken.m17n.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1043131994 3171 80.91.224.249 (21 Jan 2003 06:53:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 21 Jan 2003 06:53:14 +0000 (UTC) Cc: monnier+gnu/emacs@rum.cs.yale.edu Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18asHY-0000os-00 for ; Tue, 21 Jan 2003 07:53:12 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18asSm-00075K-00 for ; Tue, 21 Jan 2003 08:04:48 +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 18asDP-0001Mo-04 for emacs-devel@quimby.gnus.org; Tue, 21 Jan 2003 01:48:55 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18asBJ-0000oh-00 for emacs-devel@gnu.org; Tue, 21 Jan 2003 01:46:45 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18asAJ-0000Uq-00 for emacs-devel@gnu.org; Tue, 21 Jan 2003 01:45:59 -0500 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18as8P-0008VQ-00 for emacs-devel@gnu.org; Tue, 21 Jan 2003 01:43:46 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h0L6hBk06950; Tue, 21 Jan 2003 15:43:11 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h0L6hBR08798; Tue, 21 Jan 2003 15:43:11 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id PAA02999; Tue, 21 Jan 2003 15:43:11 +0900 (JST) Original-To: eliz@is.elta.co.il In-reply-to: (message from Eli Zaretskii on Tue, 21 Jan 2003 08:01:35 +0200 (IST)) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) Original-cc: emacs-devel@gnu.org 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:10928 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10928 In article , Eli Zaretskii writes: > On Mon, 20 Jan 2003, Stefan Monnier wrote: >> > unibyte sequence (hex): 81 81 C0 C0 >> > result of conversion display in multbyte b= uffer >> > 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. I didn't wrote that is a unibyte string. In the above example, only the first line is the unibyte string. The remaining lines shows the result of unibyte->multibyte conversion, thus they are multibyte strings. > For example, "9E A1" is the multibyte encoding of the 81 > byte. Yes. --- Ken'ichi HANDA handa@m17n.org