Tuesday, 7. February 2006, 15:55:15
Incorrect Path Display in Hebrew Forums
I have noticed this for quite a while and I am now finally reporting it.screenshot
As you can see by the coloured "two-sided arrow" (it's supposed to resemble an arrow, yes... err), after "Hebrew Forums" comes some text in Hebrew (the thread title) followed by the the forum title, also in Hebrew.
These two should be switched so it'll look like this: Forums >> עברית >> Hebrew Forums >> עברית >> <thread_title>...
In fact, I'm not too sure the 2nd עברית should even show up after "Hebrew Forums", but you people know the forum structure better than me.
Tuesday, 14. February 2006, 15:41:08
Tuesday, 14. February 2006, 16:03:38
Notice the way the title is displayed in this thread -- it displays correctly, probably because of the addition of the English word there.
Figure it out.
BTW, it would be nice if I could use upper-case "P" when doing the above smiley and not just lower-case "p".
If I use upper-case "P", the smiley will not display.
Thursday, 23. February 2006, 15:39:13
Thursday, 2. March 2006, 12:46:22
Testcase which doesn't work, although the markup looks mighty fine: hebrew.html
Thursday, 2. March 2006, 13:14:44
It's funny.
The second it detects another word in Hebrew that comes after one, it flips the direction. jeezy.
BTW, if I were you, I'd consult gassa, your fellow Opera employee.
He seems to be the resident BiDi wiz.
Tuesday, 22. May 2007, 19:47:29 (edited)
I had to comment on this thread after viewing the image. There is actually nothing wrong with how Opera renders that text, because that arrow character is a "neutral" character contained within RTL text. This is how BiDi (bidirectional) text works.
I'll try to explain. In pure LTR, the path (which is a text string) looks this way (I put Hebrew transliterations in CAPS):
Forums » IVRIT » Hebrew Forums » IVRIT » ZEHU, NIHNA'ATI
Since the HTML page (and the block element containing the string) isn't set to be RTL, text is treated as LTR by default (and aligned to the left). The above string is all LTR, but with Hebrew characters, the string becomes bidirectional (both LTR and RTL). The browser needs to know which parts of the text to display as RTL, rather than the default LTR.
It's done this way: the string changes to RTL when strictly-RTL characters, such as Hebrew characters, are encountered. In addition, any "neutral" characters caught within two RTL substrings (e.g. the hyphen in "Some Hebrew Text - More Hebrew Text") are added to the RTL string without breaking it. The character used for the "arrow" is neutral.
According to these rules, the parts of the text parsed as RTL are shown in red:
Forums » IVRIT » Hebrew Forums » IVRIT » ZEHU, NIHNA'ATI
Another rule of BiDi is that directional characters such as that "arrow" are mirrored when displayed in RTL, thus it eventually points leftward. So the end result, after applying RTL, would be this:
Forums » TIRVI » Hebrew Forums » ITA'ANHIN ,UHEZ « TIRVI
Which is precisely what's shown in the image. You can try typing that text in Notepad; when you align it to the left it's "LTR by default", and you'll see the same thing.
A good way to "correct" this problem, other than avoiding mixing English and Hebrew in such a textual path, is to wrap the arrow characters in LTR spans this way:
<span dir="ltr">»</span>
This will neutralize the RTL text's effect on the arrows, so the whole path will be "LTR-oriented".
There is also a way to do the above using an invisible LTR mark character (rather than an HTML tag), but this character may not render nicely on systems that don't support RTL/BiDi.
Another way is using an image instead of a text arrow (or other tricks such as a table).
Cheers,
Rotem
Saturday, 14. June 2008, 12:54:53
Originally posted by YtseJam:
Is there any way to somehow add an English letter (or some ASCII form of it), that won't be visible, right before the thread title is being inserted? That's one workaround to make it display in the right order.
There is such a character- it's called LRM (it even has an html entity).
in general, this issue is due to the fact that you are displaying mixed RTL/neutral/mixed characters in a LTR context. The best fix is to add proper RTL support to the boards, using the dir attributes in the correct place.
/yeah, I am an RTL dudette...
Monday, 16. June 2008, 05:51:06
Originally posted by sforbes:
The best fix is to add proper RTL support to the boards, using the dir attributes in the correct place.
That would shift the problem to English, though (i.e. "English1 » English2" would display as such and not as "English2 « English1"). I vote for adding a direction mark before the arrow, regardless of page direction: ‎ for LTR pages, and ‏ for RTL pages (if complete RTL support is ever added).
Saturday, 5. July 2008, 11:06:47
Forums » Opera Community » Opera Community and other Opera services » Opera's Web sites: Feedback, questions and discussions
