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: [HELP] (bug?) Saving a buffer without any conversion? Date: Fri, 17 Jan 2003 11:35:55 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200301170235.LAA12574@etlken.m17n.org> References: <87fzrxszs8.fsf@lexx.delysid.org> <200301150116.KAA09223@etlken.m17n.org> <5xk7h67k1b.fsf@kfs2.cua.dk> <200301151059.TAA09873@etlken.m17n.org> <5xbs2i7dc4.fsf@kfs2.cua.dk> <5xd6mwoggt.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 1042771053 10932 80.91.224.249 (17 Jan 2003 02:37:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 17 Jan 2003 02:37:33 +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 18ZMNw-0002q6-00 for ; Fri, 17 Jan 2003 03:37:32 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18ZMX9-0007vF-00 for ; Fri, 17 Jan 2003 03:47:03 +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 18ZMOx-00030m-02 for emacs-devel@quimby.gnus.org; Thu, 16 Jan 2003 21:38:35 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18ZMO9-0002jI-00 for emacs-devel@gnu.org; Thu, 16 Jan 2003 21:37:45 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18ZMNH-0001EI-00 for emacs-devel@gnu.org; Thu, 16 Jan 2003 21:36:53 -0500 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18ZMMX-0000h2-00 for emacs-devel@gnu.org; Thu, 16 Jan 2003 21:36:05 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h0H2Zuk23199; Fri, 17 Jan 2003 11:35:56 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h0H2ZtR17423; Fri, 17 Jan 2003 11:35:55 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id LAA12574; Fri, 17 Jan 2003 11:35:55 +0900 (JST) Original-To: storm@cua.dk In-reply-to: <5xd6mwoggt.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: eliz@is.elta.co.il Original-cc: mlang@delysid.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:10791 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10791 In article <5xd6mwoggt.fsf@kfs2.cua.dk>, storm@cua.dk (Kim F. Storm) writes: > Well, I added something to set-process-filter, Thank you. > but I'm quite unsure what to add to `insert's doc string > which already says this about the issue: > If the current buffer is multibyte, unibyte strings are converted > to multibyte for insertion (see `unibyte-char-to-multibyte'). > If the current buffer is unibyte, multibyte strings are converted > to unibyte for insertion. > It seems very odd that we have to suggest to use string-as-multibyte > (or string-as-unibyte) to convert strings prior to insertion when the > doc string says it does that automatically. I guess it has to say > something about buffer coding systems here, but what ...? > Handa-san, maybe you can tell the "true story" ? Coding systems is not relevant in `insert'. There are two ways to convert unibyte string to multibyte; string-make-multibyte and string-as-multibyte . Emacs' default behaviour for converting unibyte to multibyte (including the case of `insert') is by string-make-multibyte. But, if one want to preserve the original bytes, he must use string-as-multibyte. --- Ken'ichi HANDA handa@m17n.org