From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bidi,gmane.emacs.devel Subject: Re: Arabic support Date: Sat, 04 Sep 2010 18:29:13 +0300 Message-ID: <83zkvxh6ie.fsf@gnu.org> References: <83bp8oml9c.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1283614148 4526 80.91.229.12 (4 Sep 2010 15:29:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Sep 2010 15:29:08 +0000 (UTC) Cc: emacs-bidi@gnu.org, emacs-devel@gnu.org, jasonr@gnu.org To: Kenichi Handa Original-X-From: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Sat Sep 04 17:29:06 2010 Return-path: Envelope-to: gnu-emacs-bidi@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 1Orufy-00034J-Fi for gnu-emacs-bidi@m.gmane.org; Sat, 04 Sep 2010 17:29:06 +0200 Original-Received: from localhost ([127.0.0.1]:40876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Orufx-0004Oa-Ty for gnu-emacs-bidi@m.gmane.org; Sat, 04 Sep 2010 11:29:05 -0400 Original-Received: from [140.186.70.92] (port=57682 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrueD-0003hK-08 for emacs-bidi@gnu.org; Sat, 04 Sep 2010 11:27:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OrueB-00028Z-96 for emacs-bidi@gnu.org; Sat, 04 Sep 2010 11:27:16 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:51030) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OrueB-00028C-2h; Sat, 04 Sep 2010 11:27:15 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L8800E00AUEX300@a-mtaout22.012.net.il>; Sat, 04 Sep 2010 18:27:13 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.126.201.204]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L8800D90AXAK6C0@a-mtaout22.012.net.il>; Sat, 04 Sep 2010 18:27:11 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-bidi@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of Emacs support for multi-directional text." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Errors-To: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bidi:819 gmane.emacs.devel:129675 Archived-At: > From: Kenichi Handa > Cc: jasonr@gnu.org, emacs-bidi@gnu.org, emacs-devel@gnu.org > Date: Fri, 03 Sep 2010 10:00:02 +0900 > > As the lgstring is getting shorter each time, it seems that > composition fails each time. No, the composition was succeeding. The problem was that uniscribe_shape tried to reorder the grapheme clusters returned by ScriptShape and ScriptPlace, and the result was that the FROM and TO members of the LGSTRING object were not as set_iterator_to_next expected. This caused the iterator to fail skipping the characters that were already composed, it would instead move only one character ahead. Thanks to all the hints and useful information in this thread, I think I succeeded to fix the code in uniscribe_shape, so now the display of Arabic looks okay to me. Arabic input also seems to work; at least Emacs no longer crashes. People who actually speak Arabic please check the latest development code to see that it indeed works correctly.