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: set-process-filter-multibyte and etc. Date: Mon, 10 Feb 2003 17:15:16 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200302100815.RAA04123@etlken.m17n.org> References: <200301280032.JAA15601@etlken.m17n.org> <5xsmvdbgf7.fsf@kfs2.cua.dk> 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 1044864981 20755 80.91.224.249 (10 Feb 2003 08:16:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 10 Feb 2003 08:16:21 +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 18i96x-0005Oc-00 for ; Mon, 10 Feb 2003 09:16:19 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18i9Hr-0001nW-00 for ; Mon, 10 Feb 2003 09:27:35 +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 18i97k-0003h0-01 for emacs-devel@quimby.gnus.org; Mon, 10 Feb 2003 03:17:08 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18i97Q-0003g9-00 for emacs-devel@gnu.org; Mon, 10 Feb 2003 03:16:48 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18i97N-0003cs-00 for emacs-devel@gnu.org; Mon, 10 Feb 2003 03:16:47 -0500 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18i96E-0003Hp-00; Mon, 10 Feb 2003 03:15:35 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h1A8FHk05158; Mon, 10 Feb 2003 17:15:17 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h1A8FHR02444; Mon, 10 Feb 2003 17:15:17 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id RAA04123; Mon, 10 Feb 2003 17:15:16 +0900 (JST) Original-To: storm@cua.dk In-reply-to: <5xsmvdbgf7.fsf@kfs2.cua.dk> (storm@cua.dk) 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: rms@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:11529 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11529 In article <5xsmvdbgf7.fsf@kfs2.cua.dk>, storm@cua.dk (Kim F. Storm) writes: >> The only question is when to check >> default-enable-multibyte-characters. When a process is >> created, or just before calling a filter? I think the >> former is more like file I/O. And it may be ok to have a >> function set-process-filter-multibyte which can change the >> multibyteness of a string to a filter on the way. > Good points. Also, there could be a new `:multibyte BOOL' argument to > make-network-process to initialize the filter multibyteness of the new > process; specifying this would override the setting of > default-enable-multibyte-characters. >> Or, was the intention of set-process-multibyte actually >> set-process-filter-multibyte? > At least, that was the problem I was looking at when I suggested it, > so yes. I've just installed changes for set-process-filter-multibyte and etc. I added the followings to etc/NEWS. Could people please fix my English. --- Ken'ichi HANDA handa@m17n.org ** New function `set-process-filter-multibyte' sets the multibyteness of a string given to a process's filter. ** New function `process-filter-multibyte-p' returns t if a string given to a process's filter is multibyte. ** A filter function of a process is called with a multibyte string if the filter's multibyteness is t. That multibyteness is decided by the value of `default-enable-multibyte-characters' when the process is created and can be changed later by `set-process-filter-multibyte'. ** If a process's coding system is raw-text or no-conversion and its buffer is multibyte, the output of the process is at first converted to multibyte by `string-to-multibyte' then inserted in the buffer. Previously, it was converted to multibyte by `string-as-multibyte', which was not compatible with the behaviour of file reading. ** New function `string-to-multibyte' converts a unibyte string to a multibyte string with the same individual character codes.