diff --git a/src/EditProfileDialog.ui b/src/EditProfileDialog.ui index d057b3ae..ef246786 100644 --- a/src/EditProfileDialog.ui +++ b/src/EditProfileDialog.ui @@ -951,7 +951,7 @@ Enable BiDirectional display on terminals (valid for Arabic, Farsi or Hebrew only) - Enable BiDi rendering + Enable Bi-Directional rendering diff --git a/src/Profile.cpp b/src/Profile.cpp index 2d1a1116..b6fac857 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -165,6 +165,7 @@ FallbackProfile::FallbackProfile() setProperty(BlinkingTextEnabled,true); setProperty(BlinkingCursorEnabled,false); + setProperty(BidiRenderingEnabled,false); setProperty(CursorShape,BlockCursor); setProperty(UseCustomCursorColor,false); setProperty(CustomCursorColor,Qt::black); diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp index a83950f1..0016028e 100644 --- a/src/TerminalDisplay.cpp +++ b/src/TerminalDisplay.cpp @@ -78,6 +78,10 @@ using namespace Konsole; bool TerminalDisplay::_antialiasText = true; bool TerminalDisplay::HAVE_TRANSPARENCY = false; +// we use this to force QPainter to display text in LTR mode +// more information can be found in: http://unicode.org/reports/tr9/ +const QChar LTR_OVERRIDE_CHAR( 0x202D ); + /* ------------------------------------------------------------------------- */ /* */ /* Colors */ @@ -676,10 +680,11 @@ void TerminalDisplay::drawCharacters(QPainter& painter, // the application's default layout direction to be used instead of // the widget-specific layout direction, which should always be // Qt::LeftToRight for this widget + // This was discussed in: http://lists.kde.org/?t=120552223600002&r=1&w=2 if (_bidiEnabled) painter.drawText(rect,0,text); else - painter.drawText(rect,0,QChar(0x202D)+text); + painter.drawText(rect,0,LTR_OVERRIDE_CHAR+text); } }