[Bug 314016] [NEW] Kate is useless for editing code which contains hebrew or arabic

Launchpad Bug Tracker 314016 at bugs.launchpad.net
Thu Feb 17 09:29:20 UTC 2011


You have been subscribed to a public bug by Daniel Holbach (dholbach):

*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).

** Affects: kde4libs (Ubuntu)
     Importance: Medium
     Assignee: Jonathan Thomas (echidnaman)
         Status: Fix Released

** Affects: kde4libs (Ubuntu Intrepid)
     Importance: Medium
     Assignee: Jonathan Thomas (echidnaman)
         Status: Won't Fix

-- 
Kate is useless for editing code which contains hebrew or arabic
https://bugs.launchpad.net/bugs/314016
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is a direct subscriber.



More information about the Ubuntu-sponsors mailing list