From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22786: 25.1.50; eww arabic rendering Date: Mon, 29 Feb 2016 17:37:22 +0200 Message-ID: <83ziuj8r4d.fsf@gnu.org> References: <84fuwjca8b.fsf@gmail.com> <8760xeq5kj.fsf@gnus.org> <84y4aaza45.fsf@gmail.com> <87egc1z71n.fsf@gnus.org> <83wppsg4yj.fsf@gnu.org> <87d1rkvxbx.fsf@gnus.org> <83povjetir.fsf@gnu.org> <878u25xyk0.fsf@gnus.org> <831t7wc06e.fsf@gnu.org> <87vb582qk8.fsf@gnus.org> <837fho9ohr.fsf@gnu.org> <87twksxhed.fsf@gnus.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1456760320 12254 80.91.229.3 (29 Feb 2016 15:38:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Feb 2016 15:38:40 +0000 (UTC) Cc: 22786@debbugs.gnu.org, mohamed.hibti@gmail.com To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 29 16:38:28 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aaPtz-0006ao-KE for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Feb 2016 16:38:27 +0100 Original-Received: from localhost ([::1]:37287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaPtz-0001j8-2s for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Feb 2016 10:38:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaPte-0001Mb-PI for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 10:38:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaPta-0005H1-PN for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 10:38:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaPta-0005Go-Er for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 10:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aaPta-0005RI-Ap for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 10:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Feb 2016 15:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22786-submit@debbugs.gnu.org id=B22786.145676027120891 (code B ref 22786); Mon, 29 Feb 2016 15:38:02 +0000 Original-Received: (at 22786) by debbugs.gnu.org; 29 Feb 2016 15:37:51 +0000 Original-Received: from localhost ([127.0.0.1]:53834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaPtP-0005Qt-Ci for submit@debbugs.gnu.org; Mon, 29 Feb 2016 10:37:51 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39106) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaPtN-0005Qh-UB for 22786@debbugs.gnu.org; Mon, 29 Feb 2016 10:37:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaPtE-0005C4-Sj for 22786@debbugs.gnu.org; Mon, 29 Feb 2016 10:37:44 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaPtE-0005C0-PB; Mon, 29 Feb 2016 10:37:40 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4718 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aaPt9-0002aj-M4; Mon, 29 Feb 2016 10:37:40 -0500 In-reply-to: <87twksxhed.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 29 Feb 2016 15:35:54 +1100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114134 Archived-At: > From: Lars Ingebrigtsen > Cc: mohamed.hibti@gmail.com, 22786@debbugs.gnu.org > Date: Mon, 29 Feb 2016 15:35:54 +1100 > > Eli Zaretskii writes: > > > That paragraph is in a separate frame. That frame could have a forced > > left-to-right base direction. > > I'm not sure what you mean by "frame" here. DOM element? Probably. Forget it, I ws mistaken: there are no frames on that page. > Anyway, I looked at the Wikipedia source again, and it specifies "ltr" > as the direction. And since shr respects those settings (now), perhaps > we should just remove the hardcoded left-to-right default in eww now, > and just let it be nil? Then the aljazeera site would work > automatically. > > There might be pages that render less well, though, but we'd be > following the Unicode recommendations (more)... Removing the hardcoded value is probably a good idea (but maybe use it as fallback if the HTML tag doesn't specify anything?). However, note that support for this in shr is currently incomplete. First, there's a 3rd value, "auto", which is unsupported -- it should set bidi-paragraph-direction to nil. Moreover, a document can use several directives -- 'dir', 'bdi', and 'bdo' -- on the element level, and that is entirely unsupported now. What it means is that a page that specifies special paragraph directions for some of its paragraphs, and also mixes R2L and L2R text marked with 'bdi', will not generally render correctly. So I think for best results we should add support for the remaining bidi directives. Adding support for "dir=auto" in the HTML tag is almost trivial. To support the rest of the directives you need to add bidirectional formatting control characters before and/or around the text that is marked with these directives. (If needed, I can provide the details about the controls you need to insert in each case.)