From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: rasmith@tamu.edu Newsgroups: gmane.emacs.help Subject: Re: search-forward in emacs23 lisp Date: Sun, 28 Mar 2010 12:56:41 -0500 (CDT) Message-ID: <20100328.125641.80747594461881631.rasmith@aristotle.tamu.edu> References: <20100328.120401.200754749763864021.rasmith@aristotle.tamu.edu> Reply-To: rasmith@tamu.edu NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1269799060 7308 80.91.229.12 (28 Mar 2010 17:57:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 28 Mar 2010 17:57:40 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: lennart.borgman@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 28 19:57:33 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nvwjh-0006M7-HC for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Mar 2010 19:57:21 +0200 Original-Received: from localhost ([127.0.0.1]:37724 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nvwjg-0005JD-Mw for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Mar 2010 13:57:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nvwj8-0005FV-TQ for help-gnu-emacs@gnu.org; Sun, 28 Mar 2010 13:56:47 -0400 Original-Received: from [140.186.70.92] (port=47582 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nvwj6-0005ET-AC for help-gnu-emacs@gnu.org; Sun, 28 Mar 2010 13:56:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nvwj5-0003P3-1S for help-gnu-emacs@gnu.org; Sun, 28 Mar 2010 13:56:44 -0400 Original-Received: from aristotle.tamu.edu ([128.194.75.5]:60067) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nvwj4-0003Ov-SI for help-gnu-emacs@gnu.org; Sun, 28 Mar 2010 13:56:42 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by aristotle.tamu.edu (Postfix) with ESMTP id 8AF6AE041C; Sun, 28 Mar 2010 12:56:41 -0500 (CDT) In-Reply-To: X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:72519 Archived-At: From: Lennart Borgman Subject: Re: search-forward in emacs23 lisp Date: Sun, 28 Mar 2010 19:10:59 +0200 >> Nope. =A0That's exactly what caused the original problem (that is, t= he >> code that broke was exactly what you suggest). =A0Using either one o= f >> these, what search-forward will look for is a two-byte string (in >> other words, it undertakes to convert the high 8-bit character into >> something like a utf-8 representation of it (\377 can't occur as the= >> first byte of a utf-8 character, which is probably what triggers >> this). > = > = > Oh, sorry. I read your first message now. It looks like you have foun= d > a problem with search-forward in this case and a bug in isearch. I > suggest that you file a bug report. I'll do that. To say a little more about the problem: (char-to-string ?\xff) produces a *two-byte* string, \0x00\0xff, while = (unibyte-string ?\377) = produces a *one-byte* string, as it should. However, when *either* of these is given as an argument to search-forward, what it actually searches for is the *two-byte* string \231\277. I don't really see where that's coming from, since I thought the utf-8 representation of \377 was \303\077 (\xc33f). I know that emacs23 uses a default internal format with the name utf-8-emacs for buffers, but I don't know its details. Robin Smith