Quoth Nicolas Williams on Thursday, 09 December 2010: > On Thu, Dec 09, 2010 at 07:25:11PM +0200, Amit Ramon wrote: > > Nicolas Williams <nicolas.willi...@oracle.com> [2010-12-08 13:25 -0600]: > > > > >On Wed, Dec 08, 2010 at 09:17:02PM +0200, Amit Ramon wrote: > > >>Chip Camden <sterl...@camdensoftware.com> [2010-12-08 11:01 -0800]: > > >>>On a related topic, is there any way to get mutt to display RTL for > > >>>certain characters? The Hebrew characters in your signature, for > > >>>instance, are displayed LTR in my mutt, so they read backwards. > > >> > > >>Not directly. For that you have to use a bidi-aware terminal. I'm > > >>running Mutt in Mlterm terminal emulator, which can handle LTR and RTL > > >>quiet well (but not perfectly). > > > > > >I agree, this is a job for the rendered, which is also why you shouldn't > > >need your plain2html program -- the web browsers displaying your email > > >in webmail apps should handle bi-di correctly as long as they understand > > >UTF-8. Might the webmail backend be doing something wrong? > > > > I don't agree... web browsers are not supposed to be able to know how > > to render bidi text. For this reason there are dir tags in > > HTML. Webmail backends are also not doing it. This is not the same as > > "understand UTF-8". > > I'm not too familiar with bi-di, and I can see that a dir tag does exist > for HTML. We seem to agree that terminals (which have no HTML-like > tags) are supposed to figure out how to render bi-di correctly. Looking > around a bit I see that there are three standard ways to indicate > direction changes: > > - Use Unicode control characters, most of which are discouraged, except > for the right-to-left and left-to-right marks (which are for > specifying direction for weak-directional characters relative to > surrounding strong-directional characters); > > - Use HTML dir attribute or bdo element; > > - Use CSS rules ('direction' and 'bidi-override' props). > > The last two are for HTML docs only. The first one is the only one that > works in all contexts, while markup solutions based on anything other > than Unicode require tags/attributes to be defined. > > But there is a Unicode bi-di algorithm... From what I can tell, > renderers that implement it should not require marks (except for > weak-directional characters, as mentioned above). > > > >How would I know if the Hebrew text in your signature is displaying > > >correctly? [...] > > > > The first Hebrew letter in my first name is "Ayn", which looks > > schematically like this: > > > > [...] > > > > In a correct appearance you should see it at the rightmost place on > > the line that has my first name, Amit, in my signature... if it > > follows the word Amit immediately after the blank space, the terminal > > does not support bidi. > > Indeed, my terminal is not displaying those in right-to-left. I see > that some applications do display properly (for example, the Bluefish > editor does, but vim/gvim does not). > > Nico > --
If you're using urxvt as your terminal window, I've created a Perl extension that will apply bidi rules to the text. Check it out: http://www.chipstips.com/?p=584 -- Sterling (Chip) Camden | sterl...@camdensoftware.com | 2048D/3A978E4F http://camdensoftware.com | http://chipstips.com | http://chipsquips.com
pgpEdy5quqO44.pgp
Description: PGP signature