Kate is useless for editing code which contains hebrew or arabic

Bug #314016 reported by Diego Iastrubni
6
Affects Status Importance Assigned to Milestone
kde4libs (Ubuntu)
Fix Released
Medium
Jonathan Thomas
Intrepid
Won't Fix
Medium
Jonathan Thomas

Bug Description

*Below added by Jonathan Thomas*
   Stable Release Update (SRU) infos:
   -Impact: Text editing for RTL languages becomes difficult, see bug description below
   -Addressed by: This bug has been addressed by adding an upstream patch included in KDE 4.2 that fixes this.
   -Testcase: Install kate. Start kate. Copy the php code from the bug description and paste it in to kate
   -Patch/regression potential: Small. The changes were part of the recent KDE 4.2 release and we have had no complaints yet.
 #######################################################################

This is a request for a backport from trunk to 4.1.3 in ubuntu. The original bug is https://bugs.kde.org/show_bug.cgi?id=178594

"Back in March someone (who shall remain un-named) added to kate a new function which would calculate the "best direction" of a paragraph by counting the LTR and RTL chars in that line. That is r788729: http://websvn.kde.org/trunk/KDE/kdelibs/kate/render/katerenderer.cpp?r1=772931&r2=788729 The last month I found a really ugly "bug" in it.

Imagine this php code:

function foo() {
  $a = "שלום עולם";
  return $a;
}

Now paste it into kate and see what happens. This get funkier when the hebrew is inside lists or hashes. IMHO, this renders this "feature" useless - much more people will be using kate to code then to write "plain text". My proposal is detecting the paragraph direction using QString::isRightToLeft() and in 4.3 also provide a manual method for setting the direction of the paragraph. IMHO, this renders kate unusable for editing code."

A visual display of how code looks can be seen here:
http://elcuco.blogli.co.il/files/2009/01/kate-hebrew-code-broken.png

I am requesting a backport of changeset 905112 to the currently available packages in 8.10. See the patch here: http://websvn.kde.org/?view=rev&revision=905112 (it will apply to the branch as well).

Revision history for this message
Harald Sitter (apachelogger) wrote :

Why does the fix not get backported by KDE to the 4.1 branch and thus 4.1.4?

Changed in kdesdk-kde4:
status: New → Incomplete
Revision history for this message
Diego Iastrubni (elcuco) wrote :

first, because kde 4.1.4 is tagged in a few hours ;-)
second, because this is a behavior change inside a branch - not accepted.

From KDE's point of view, 4.2.0 is released in a week, or two or three and 4.1.4 is obsolete (more or less...). From the ubuntu point of view: 4.1.4 should be supported for a year (this is the policy no?). I would not like to continue coding broken php code under this kate...

Revision history for this message
Harald Sitter (apachelogger) wrote :

sounds sensible

Changed in kdesdk:
importance: Undecided → Medium
milestone: none → intrepid-updates
status: Incomplete → Confirmed
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

The code being patched is actually in kde4libs. Working on this one now.

Changed in kdesdk:
assignee: nobody → echidnaman
status: Confirmed → In Progress
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

I'm marking this fixed since it is fixed in the current development version of Jaunty, but I'm also nominating it for Intrepid

Changed in kde4libs:
status: In Progress → Fix Released
Changed in kde4libs:
assignee: nobody → echidnaman
importance: Undecided → Medium
milestone: none → intrepid-updates
status: New → In Progress
milestone: intrepid-updates → none
Revision history for this message
Diego Iastrubni (elcuco) wrote :

I was actually hooping this would get backported to KDE 4.1 in Ubuntu 8.10, not everyone uses the unsupported KDE 4.2 in Ubuntu 8.10.

Marking this as "we fixed this problem" is not exactly correct, and not what I requested.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

That's what I'm doing. That's what I said I was doing too.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Source package for intrepid-proposed, as promised.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :
description: updated
Revision history for this message
Diego Iastrubni (elcuco) wrote :

Jonathan, HUGE THANKS!

But please... pretty please... (and that is for all other ubuntu developers) please be more specific when writing in these bug reports. Not everyone is a native english speaker, and many time I fail to understand what did you really meant.

Revision history for this message
Martin Pitt (pitti) wrote :

SRU ack, please upload.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Oops, that was the source package for the other SRU I was doing for kdesdk...
Here's the real one. (Also fixes bug 330446)

Revision history for this message
Jonathan Thomas (echidnaman) wrote :
Revision history for this message
Jonathan Riddell (jr) wrote :

Uploaded to intrepid-proposed, awaiting approval.

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into intrepid-proposed; please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in kde4libs:
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Sorry, belay that:

FAILED: kde4libs (kde4libs_4.1.4-0ubuntu1~intrepid1.1.diff.gz is already published in archive for intrepid)

1.1 was a no-change rebuild in -security to fix dependencies. Please reupload as intrepid1.2.

Changed in kde4libs:
status: Fix Committed → In Progress
Revision history for this message
Jonathan Thomas (echidnaman) wrote :
Revision history for this message
Jonathan Thomas (echidnaman) wrote :
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Ugh, sorry. The original upload with the fix failed and I never got around to uploading a new one. Totally forgot about it. Though at this point it'd probably be better to upgrade to Jaunty, or at least KDE 4.2.

Changed in kde4libs (Ubuntu Intrepid):
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.