From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Case mapping of sharp s Date: Sat, 21 Nov 2009 13:45:14 +0200 Message-ID: <83fx88p0dx.fsf@gnu.org> References: <4B05A11F.5000700@gmx.de> <4B05D3EE.2000101@gmx.de> <4B0759BA.2010303@gmx.de> <83k4xkp84j.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1258803938 17909 80.91.229.12 (21 Nov 2009 11:45:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Nov 2009 11:45:38 +0000 (UTC) Cc: grishka@gmx.de, handa@m17n.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 21 12:45:30 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NBoPA-00030x-UT for ged-emacs-devel@m.gmane.org; Sat, 21 Nov 2009 12:45:29 +0100 Original-Received: from localhost ([127.0.0.1]:50453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBoPA-0003ou-E8 for ged-emacs-devel@m.gmane.org; Sat, 21 Nov 2009 06:45:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBoP2-0003oV-W5 for emacs-devel@gnu.org; Sat, 21 Nov 2009 06:45:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBoOy-0003nc-AA for emacs-devel@gnu.org; Sat, 21 Nov 2009 06:45:20 -0500 Original-Received: from [199.232.76.173] (port=48679 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBoOy-0003nZ-40 for emacs-devel@gnu.org; Sat, 21 Nov 2009 06:45:16 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:56310) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NBoOx-00070E-Ll for emacs-devel@gnu.org; Sat, 21 Nov 2009 06:45:15 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0KTG00I00J7MO200@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Sat, 21 Nov 2009 13:45:14 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.70.37.193]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KTG00GBLJBDK660@a-mtaout22.012.net.il>; Sat, 21 Nov 2009 13:45:14 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:117428 Archived-At: > From: Andreas Schwab > Date: Sat, 21 Nov 2009 10:33:47 +0100 > Cc: grischka , emacs-devel@gnu.org, monnier@iro.umontreal.ca, > handa@m17n.org > > Eli Zaretskii writes: > > > CHAR_TO_BYTE could be expensive, yes. But how else can you convert an > > arbitrary character position to the corresponding byte position? When > > you scan forward, you know the byte length of a multi-byte UTF-8 > > sequence by the first byte, but what do you do when you scan backwards? > > The first byte of a UTF-8 sequence is easily recognizable, so finding > out the length of the previous UTF-8 sequence is nearly as easy (see > DEC_POS). I guess simple_search should use DEC_POS, then.