Re: HTML support (was: Please Support Right To Left Direction)

On 04/21/2008 02:54:13 AM Mon, Ali49969 wrote:
In below I write a Persian text because you can view in Balsa

Example Persian text:

این یک متن فارسی برای test برنامه است

Very Thanks

[ snip ]

That's an enlightening example! One issue that I see is that the second line is displayed differently in Balsa and in a browser pointed at the Balsa list <URL:>.

The mail I received in Balsa shows the second line as "برنامه است", followed by "test", followed by "این یک متن فارسی برای", right-justified, whereas my browser shows the same strings but in reverse order and left-justified. Both Pango (which sets up the display in Balsa) and the browser use the "unicode bidi algorithm" to display this line. But Pango is given plain text and decides that the line is a rtl context, whereas the browser is given HTML and relies on "dir=" attributes to decide on the context. This explains the different order of the strings. I'm guessing that the Balsa/Pango version is correct.

One solution would be to convert a message containing lines with rtl context into html, with a sequence of rtl lines wrapped in <div dir="rtl">...</div>. Rich text is a lighter-weight format than html, but I don't know whether it has any corresponding construct. Since the converted message would no longer be viewable by a non-html-enabled mail reader, conversion would have to be somehow optional.



Attachment: pgpB1HM1whk7s.pgp
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]