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: Emacs-diffs Digest, Vol 2, Issue 28 Date: Mon, 20 Jan 2003 10:52:31 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200301200152.KAA16258@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=US-ASCII X-Trace: main.gmane.org 1043027521 5731 80.91.224.249 (20 Jan 2003 01:52:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 20 Jan 2003 01:52:01 +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 18aR6W-0001UI-00 for ; Mon, 20 Jan 2003 02:52:00 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18aRHA-0007HK-00 for ; Mon, 20 Jan 2003 03:03:00 +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 18aR7g-0005TL-02 for emacs-devel@quimby.gnus.org; Sun, 19 Jan 2003 20:53:12 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18aR78-0005RG-00 for emacs-devel@gnu.org; Sun, 19 Jan 2003 20:52:38 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18aR75-0005O9-00 for emacs-devel@gnu.org; Sun, 19 Jan 2003 20:52:36 -0500 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18aR74-0005Lq-00; Sun, 19 Jan 2003 20:52:34 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h0K1qWk16434; Mon, 20 Jan 2003 10:52:32 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h0K1qVR01244; Mon, 20 Jan 2003 10:52:31 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id KAA16258; Mon, 20 Jan 2003 10:52:31 +0900 (JST) Original-To: rms@gnu.org In-reply-to: (message from Richard Stallman on Fri, 17 Jan 2003 19:48:02 -0500) 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) 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:10885 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10885 In article , Richard Stallman writes: > ! The string argument is normally a multibyte string, except: > ! - if the process' input coding system is no-conversion or raw-text, > ! it is a unibyte string (the non-converted input), or else > Is this really the right way for it to work? > Should the choice of unibyte or multibyte string > be tied in this way to the choice of coding system? This facility was added upon someone's request or to fix some problem long ago. 1998-12-21 Kenichi Handa [...] * process.c (read_process_output): Decide the multibyteness of string given to a process filter by a coding system used for decoding the process output. But, I don't remeber the detail now. > If you want multibyte strings "without decoding", would emacs-mule > give you that? It depends on what kind of multibyte string we want. If we want the same result as reading a file containing the same byte sequence by emacs-mule, emacs-mule is fine. This is the same as reading by no-converson, and insert the given unibyte string by: (insert (string-as-multibyte UNIBYTE-STRING)). If we want a multibyte sequence that is the same as the result of converting each of the original bytes by unibyte-char-to-multibyte, we must read by no-conversion, and insert the given unibyte string just by `insert': (insert UNIBYTE-STRING) This is the same as doing: (insert (string-make-multibyte UNIBYTE-STRING)) If we want a multibyte sequence but each character contained is one of ascii, eight-bit-control, and eight-bit-graphic corresponding to the original bytes, we must read by no-conversion, and insert characters one by one as below: (apply 'insert (string-to-list UNIBYTE-STRING)) Perhaps, we must have a function, say, string-to-multibyte, and make this enable. (insert (string-to-multibyte UNIBYTE-STRING)) --- Ken'ichi HANDA handa@m17n.org