From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: eight-bit char handling in emacs-unicode Date: 27 Nov 2003 09:23:00 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200311250107.KAA24646@etlken.m17n.org> <200311260007.JAA26617@etlken.m17n.org> <200311270134.KAA28664@etlken.m17n.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1069943122 19675 80.91.224.253 (27 Nov 2003 14:25:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 Nov 2003 14:25:22 +0000 (UTC) Cc: jas@extundo.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Nov 27 15:25:19 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1APN55-0000vI-00 for ; Thu, 27 Nov 2003 15:25:19 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1APN54-0008DG-00 for ; Thu, 27 Nov 2003 15:25:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1APO2J-0006mz-RD for emacs-devel@quimby.gnus.org; Thu, 27 Nov 2003 10:26:31 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1APO23-0006ic-M3 for emacs-devel@gnu.org; Thu, 27 Nov 2003 10:26:15 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1APO12-0006B5-Nq for emacs-devel@gnu.org; Thu, 27 Nov 2003 10:25:43 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.24) id 1APO11-0006AG-7f for emacs-devel@gnu.org; Thu, 27 Nov 2003 10:25:11 -0500 Original-Received: from vor.iro.umontreal.ca (vor.iro.umontreal.ca [132.204.24.42]) by mercure.iro.umontreal.ca (8.12.9/8.12.9) with ESMTP id hAREN0bj026694; Thu, 27 Nov 2003 09:23:01 -0500 Original-Received: by vor.iro.umontreal.ca (Postfix, from userid 20848) id 840DC3C63E; Thu, 27 Nov 2003 09:23:00 -0500 (EST) Original-To: Kenichi Handa In-Reply-To: <200311270134.KAA28664@etlken.m17n.org> Original-Lines: 38 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-DIRO-MailScanner: Found to be clean X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:18166 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18166 >> I can't answer this question without knowing the answer to my question: >> what is string-make-unibyte used for. > It is used for converting a multibyte string to unibyte > before it is inserted in a unibyte buffer. I meant `what is "converting from multibyte to unibyte" used for'. I.e. it can be used for different things in different contexts and I can't answer in general, so I need a concrete case. > It's an ambiguous statement. Which are you sauing? > Replace string-make-unibyte by: > (1) encode-coding-string or make-string-unibyte. > (2) a code that applies encode-coding-string or > make-string-unibyte to the whole string depending on > something (perhaps on the input string?). > (3) a code that applies encode-coding-string to substrings > where that is appropriate, and applies make-string-unibyte > to the remaing substrings. > (4) something that I still don't understand. I'm saying that each *call* to string-make-unibyte can be replaced by a call to either encode-coding-string or make-string-unibyte. But the decision of which to use and which coding-system to use depends on the context. Now why would we want to do the work of changing all those calls? Because all those that would use encode-coding-string are incorrect in using string-make-unibyte because they won't do the right thing in some language environments. Stefan