Sign up | Lost password? | Help

[ advanced search ]

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.

Thursday, 9. February 2006, 12:05:36

I'm not too sure what you mean by that. :wink:

Tuesday, 14. February 2006, 15:36:43

olekasper

Monkey Master

avatar

Posts: 1117

Norway

I don't get this. Looks fine in the HTML code. Opera bug? :smile:


no, looks the same in Gecko. I think we need to hire some RTL dude chick.

Tuesday, 14. February 2006, 15:41:08

sgunhouse

Volunteer

avatar

Posts: 52734

Flag City, USA

Note also the "double arrow" right between them is backwards ... :confused:

Tuesday, 14. February 2006, 15:42:09

Hey, what's wrong with hiring an RTL dude? :frown:

Tuesday, 14. February 2006, 16:03:38

Here is something that might help you debug this...
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. p:

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.

Wednesday, 15. February 2006, 10:29:33

olekasper

Monkey Master

avatar

Posts: 1117

Norway

P:


heh. indeed. weird behaviour.. (that : P just vanishes I mean)

Thursday, 23. February 2006, 15:39:13

sgunhouse

Volunteer

avatar

Posts: 52734

Flag City, USA

It seems that anytime you write ":" followed by a letter, it just vanishes. If I write : followed by dog, I get :dog. Unless of course I disable smilies for that post.

Thursday, 23. February 2006, 15:43:13

Actually the bump was for the original thread issue, but fixing the : bit would be nice, too. :wink:

Thursday, 23. February 2006, 19:02:25

sgunhouse

Volunteer

avatar

Posts: 52734

Flag City, USA

I see my :dog reappeared ...

Thursday, 23. February 2006, 19:09:26

I see the path display is still incorrect...

Thursday, 2. March 2006, 12:30:14

He knows I'm going to bump this for eternity... :D

Thursday, 2. March 2006, 12:46:22

olekasper

Monkey Master

avatar

Posts: 1117

Norway

If you can provide me with HTML code which actually works as it should, I'll implement it. Deal? :smile:

Testcase which doesn't work, although the markup looks mighty fine: hebrew.html

Thursday, 2. March 2006, 13:14:44

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.

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.

Friday, 6. October 2006, 12:10:09

hallvors

Opera Software

avatar

Posts: 1351

Norway

Opera Software
Couldn't Eira look at this? I know next to nothing about BiDi ;-o

Friday, 6. October 2006, 12:18:53

She did, there is some open bug about it.
I was told it will be addressed in a future my.opera updated.

I just hope they didn't forget about this. :smile:

Friday, 9. March 2007, 08:01:36

This is, of course, not fixed in new My.Opera. :\

Tuesday, 22. May 2007, 19:47:29 (edited)

Hey YtseJam (how do you pronounce that thing? P:) et al.,

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

sforbes

avatar

Posts: 61

Israel

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: &lrm; for LTR pages, and &rlm; for RTL pages (if complete RTL support is ever added).

Saturday, 5. July 2008, 07:50:43

ProfSeuss

avatar

Posts: 183

And what about?

פורומים>>פורומים עברית >>אופרה לשולחן עבודה

No English no problem!

Saturday, 5. July 2008, 11:06:47

Indeed, I mentioned that option in the huge post. The problem is that it requires some degree of localization, whereas the &lrm; thing can be added in about 2 minutes.

Saturday, 5. July 2008, 12:02:16

I highly doubt we will see full localization of the Hebrew group which is why I too am after a more moderate fix for this issue.

Forums » Opera Community » Opera Community and other Opera services » Opera's Web sites: Feedback, questions and discussions