Re: bidi mirror
Dov Grobgeld <[email protected]> Wed, 29 Mar 2017 13:39:27 +0300
| Newsgroups | gmane.comp.internationalization.fribidi |
|---|---|
| Message-ID | <CA++fsGFK4zM9B9HatyamV4d615QTWco=XxnA74ec+byWPQtrLQ@mail.gmail.com> |
--===============0193598270== Content-Type: multipart/alternative; boundary=94eb2c056e88d18491054bdc30ee --94eb2c056e88d18491054bdc30ee Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Unfortunately fribidi isn't Unicode 6.3 complient yet. You may want to test the following branch and see if it makes a difference: https://github.com/dov/fribidi/tree/unicode63 But I'm in doubt as we have not yet implemented the N0 rule of the Unicode6.3 standard, which seems to be relevant to your problem. It is still (unfortunately far too slow) work in progress. Regards, Dov On Wed, Mar 29, 2017 at 1:13 PM, Eduardo Casti=C3=B1eyra < [email protected]> wrote: > > > On 3/28/2017 7:24 PM, Eli Zaretskii wrote: > >> Consider this level 0 text: >>> >>> http://unicode.org/cldr/utility/bidi.jsp?a=3Dsample+%28text%29&p=3DLTR >>> >>> Then, we change the Paragraph direction in the drop down from LTR to RT= L >>> >>> http://unicode.org/cldr/utility/bidi.jsp?a=3Dsample+%28text%29&p=3DRTL >>> >>> Suddenly, all the L0 become L2 except the last parenthesis and thus, th= e >>> reordered view shows the parenthesis at the beginning. >>> >> That page says "Not yet updated for the changes in Unicode 6.3!", >> which means the Bidirectional Parentheses Algorithm (BPA) is not >> accounted for. The BPA causes the text to be rendered reasonably, >> with parentheses mirrored as expected. E.g., try that in a recent >> enough Emacs. >> >> I think I didn't ask the correct question. The problem is not the > parenthesis not flipping but the fact that the last parenthesis level is > odd, which causes: > > 1) The parenthesis being shown at the beginning of the sentence. > 2) fribidi_shape_mirroring flipping the parenthesis when it shouldn't > > So, in this regard I actually cannot complain about the behavior of > fribidi_shape_mirroring, in any case I should complain about > fribidi_log2vis but I don't think it is doing anything different that wha= t > the BiDi algorithm says. I just would like to know how to prevent this ca= se. > > I have compared MS Notepad in Windows 10 and Windows 7 (pre-U6.3) and > you're right, Windows 7 puts the parenthesis at the beginning and Windows > 10 puts it at the end which is consistent with the Unicode 6.3 explanatio= n > but... > > What about Fribidi? Doesn't it implement U6.3 ? Why am I seeing the > parenthesis also at the beginning in my application ? > > Thanks! > > > > > > _______________________________________________ > fribidi mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/fribidi > --94eb2c056e88d18491054bdc30ee Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:arial,he= lvetica,sans-serif">Unfortunately fribidi isn't Unicode 6.3 complient y= et.<br><br>You may want to test the following branch and see if it makes a = difference:<br><br><a href=3D"https://github.com/dov/fribidi/tree/unicode63= ">https://github.com/dov/fribidi/tree/unicode63</a><br><br></div><div class= =3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif">But I&#= 39;m in doubt as we have not yet implemented the N0 rule of the Unicode6.3 = standard, which seems to be relevant to your problem. It is still (unfortun= ately far too slow) work in progress.<br><br></div><div class=3D"gmail_defa= ult" style=3D"font-family:arial,helvetica,sans-serif">Regards,<br></div><di= v class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif">= Dov<br><br></div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_q= uote">On Wed, Mar 29, 2017 at 1:13 PM, Eduardo Casti=C3=B1eyra <span dir=3D= "ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank">edu= [email protected]</a>></span> wrote:<br><blockquote class=3D"gmail_q= uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e= x"><span class=3D""><br> <br> On 3/28/2017 7:24 PM, Eli Zaretskii wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><blockquote class=3D"gmail_quote" style=3D"m= argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Consider this level 0 text:<br> <br> <a href=3D"http://unicode.org/cldr/utility/bidi.jsp?a=3Dsample+%28text%29&a= mp;p=3DLTR" rel=3D"noreferrer" target=3D"_blank">http://unicode.org/cldr/ut= ilit<wbr>y/bidi.jsp?a=3Dsample+%28text%<wbr>29&p=3DLTR</a><br> <br> Then, we change the Paragraph direction in the drop down from LTR to RTL<br= > <br> <a href=3D"http://unicode.org/cldr/utility/bidi.jsp?a=3Dsample+%28text%29&a= mp;p=3DRTL" rel=3D"noreferrer" target=3D"_blank">http://unicode.org/cldr/ut= ilit<wbr>y/bidi.jsp?a=3Dsample+%28text%<wbr>29&p=3DRTL</a><br> <br> Suddenly, all the L0 become L2 except the last parenthesis and thus, the<br= > reordered view shows the parenthesis at the beginning.<br> </blockquote> That page says "Not yet updated for the changes in Unicode 6.3!",= <br> which means the Bidirectional Parentheses Algorithm (BPA) is not<br> accounted for.=C2=A0 The BPA causes the text to be rendered reasonably,<br> with parentheses mirrored as expected.=C2=A0 E.g., try that in a recent<br> enough Emacs.<br> <br> </blockquote></span> I think I didn't ask the correct question. The problem is not the paren= thesis not flipping but the fact that the last parenthesis level is odd, wh= ich causes:<br> <br> 1) The parenthesis being shown at the beginning of the sentence.<br> 2) fribidi_shape_mirroring flipping the parenthesis when it shouldn't<b= r> <br> So, in this regard I actually cannot complain about the behavior of fribidi= _shape_mirroring, in any case I should complain about fribidi_log2vis but I= don't think it is doing anything different that what the BiDi algorith= m says. I just would like to know how to prevent this case.<br> <br> I have compared MS Notepad in Windows 10 and Windows 7 (pre-U6.3) and you&#= 39;re right, Windows 7 puts the parenthesis at the beginning and Windows 10= puts it at the end which is consistent with the Unicode 6.3 explanation bu= t...<br> <br> What about Fribidi? Doesn't it implement U6.3 ? Why am I seeing the par= enthesis also at the beginning in my application ?<br> <br> Thanks!<div class=3D"HOEnZb"><div class=3D"h5"><br> <br> <br> <br> <br> ______________________________<wbr>_________________<br> fribidi mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">fribidi@= lists.freedesktop.org</a><br> <a href=3D"https://lists.freedesktop.org/mailman/listinfo/fribidi" rel=3D"n= oreferrer" target=3D"_blank">https://lists.freedesktop.org/<wbr>mailman/lis= tinfo/fribidi</a><br> </div></div></blockquote></div><br></div> --94eb2c056e88d18491054bdc30ee-- --===============0193598270== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZnJpYmlkaSBt YWlsaW5nIGxpc3QKZnJpYmlkaUBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5m cmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9mcmliaWRpCg== --===============0193598270==--