On Mon, Apr 03, 2017 at 09:41:47PM +0000, Stuart Stuple wrote:
I believe for plain text with no fancy Unicode values, the rendering is well-defined because the period and ampersand are both neutral and assume directionality from the surrounding characters. See http://www.w3.org/International/articles/inline-bidi-markup/uba-basics.
Well, what do you mean "no fancy Unicode values"? That's the problem here. You're right that that U+0040 is Bidi_Class Other_Neutral and U+002E is Common_Separator, so neither should change directionality. But that's not the problem. The problem is that many email addresses are of the form first-local-part.second-local-part@label.secondlabel. So let's start with the simple case: [some ASCII characters]@arabic-string.com now, the bidi algorithm is probably going to do something like this (at least in my reading it should): LTR@RTL.com Now, what if instead it's [some arabic characers]@arabic-string.com ? The problem is easy to see: this part [some arabic characers]@arabic-string should actually render arabic-string (in rtl)@[some arabic characers] (in rtl) And now you don't know where to put .com. This is a genuinely hard problem for user interfaces; and again, if intuitive interfaces for native Arabic-script users have so far emerged it is news to me. (I would not be surprised that it be news -- I don't use Arabic to write anything -- but last time I checked with relevant people working on the interfaces I got a lot of wailing about this problem so I don't think I'm the only one who thinks its hard.)
Add Unicode directionality controls and you get a wide variety of orderings
Yes, of course. A -- Andrew Sullivan ajs@anvilwalrusden.com