Bug 175931 - text editor's line is aligned to the right if there are more hebrew chars then english ones
Summary: text editor's line is aligned to the right if there are more hebrew chars the...
Status: RESOLVED DUPLICATE of bug 178594
Alias: None
Product: krusader
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Shie Erlich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-23 21:51 UTC by Nadav Kavalerchik
Modified: 2009-04-24 19:24 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nadav Kavalerchik 2008-11-23 21:51:48 UTC
Version:           2.0.0-beta2 "SVN TRUNK Space Odyssey" (using 4.1.3 (KDE 4.1.3), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.27-7-generic

i think this is an issue with the rtl (hebrew) algorithm

Now...
no matter  how the line starts: hebrew or english, if there are more charecters of english in the line then it is justified (on the fly) to the left and other wise to the right.

it should be (i think)
if i start the line with english it should stay justified to the left at all times and other wise if i start it in hebrew it should be justified to the right.

example:
i would like the following line to be justified to the right.
a = "שורה ארוכה של תווים בעברית"
like...
a= "this is a long line..."

maybe it is a deeper issie with QT ?
Comment 1 Dotan Cohen 2008-12-11 09:39:29 UTC
I agree, the first letter should determine directionality. I am almost certain that this is a dupe, though I cannot find the original bug.
Comment 2 Nadav Kavalerchik 2008-12-13 14:59:27 UTC
see this page :
http://www.w3.org/International/tutorials/svg-tiny-bidi/Overview.en.php

for the right way to implement the bidi algorithm.
Comment 3 Matitiahu Allouche 2009-01-30 14:18:55 UTC
The Unicode Bidi Algorithm (UBA) states that, in the absence of a higher level protocol to specify the base direction of a piece of text, the first "strong" character (character with a clear left-to-right or right-to-left directionality) determines the base direction of the text.
In most cases, left alignment is appropriate for text with a left-to-right base direction, and right alignment is appropriate for text with a right-to-left base direction, so that the first strong character is also an appropriate criterion to determine the alignment.
Comment 4 Dotan Cohen 2009-04-24 15:46:04 UTC
Why is this filed as a Krusader bug? I could not get the Krusader CLI to align right at all, even with the appropriate option selected in Qt Config.

For that matter, I cannot get Kate to right-align either.
Comment 5 Diego Iastrubni 2009-04-24 19:24:12 UTC
Mati, Dotan,

This was done by design in KDE 4.1 - originally I designed katepart to choose the direction not by the first strong char, but by the most characters available.

This is fixed in KDE 4.2, and it's a dup of 178594. This is not a bug in Qt4, but only in katepart.

If you are using Ubuntu, please see also https://bugs.launchpad.net/ubuntu/+source/kde4libs/+bug/314016

Closing.

*** This bug has been marked as a duplicate of bug 178594 ***