Arabic issue #22: qTextEdit->setAlignment(Qt::AlignRight) problems.
by Munzir Taha
With Qt::AlignRigth the text is aligned to the right but whenver I press space
while typing Arabic the cursor jumps every time to the begining of the line
and again to the correct position when a letter is typed. This is very
distracting. If more than one space is pressed the cursor would go out of the
window and hence can't even be seen. Tabs in the beginning of the line
doesn't show and in the middle of a text push go in the wrong direction!
Another more serious issue happen when I type 1-2 ARABIC (that's 1 first then
a dash then 2 then ARABIC letters) like the case in outline numbering at the
beginning of a paragraph it displays as ARABIC 1-2 (that's beginning from
the right 2 then a dash then 1 then the ARABIC) instead of ARABIC 2-1 so
though I mean section 1 subsection 2, it will be read section 2 subsection 1!
I filed a similar bug to OpenOffice.org with screenshots in case it's not
clear.
SCREENSHOTS:
http://www.openoffice.org/issues/show_bug.cgi?id=34309
--
Munzir Taha PGP Key available
gpg --recv-keys --keyserver www.mandrakesecure.net F0671821
Telecommunications and Electronics Engineer
Mandrake Club Member
Maintainer of the OpenBugs Wiki page at
http://arabic-fedora.org/
Maintainer of Fedora Arabic Translation Project
https://listman.redhat.com/mailman/listinfo/fedora-trans-ar
CIW Designer, ICDL, MOUS, Linux+, LPI 101
New Horizons CLC, Riyadh, SA
18 years, 11 months
Don't test me, I will ...
by Munzir Taha
Salaam,
It seems the good guys here is willing to test to which extent I would fulfill
my promise! No, please don't do it, I will fail. Come on...
Today I 'took' system-config-services and would review and commit it tomorrow
inshallah
--
Munzir Taha PGP Key available
gpg --recv-keys --keyserver www.mandrakesecure.net F0671821
Telecommunications and Electronics Engineer
Maintainer of the OpenBugs project page at
http://www.arabic-fedora.org/munzir/OpenBugs.html
Maintainer of Fedora Arabic Translation Project
https://listman.redhat.com/mailman/listinfo/fedora-trans-ar
Master CIW Designer, ICDL, MOUS, Linux+, LPI 101
New Horizons CLC, Riyadh, SA
18 years, 11 months
Arabic issue #43: A Segmentation fault if Arabic characters' font size >= 65
by Munzir Taha
Hi Cuters,
Using Qt version 4.0.0-rc1-snapshot-20050523
On Mandrakelinux release 10.2 (Limited Edition 2005) for i586
QApplication::setFont(QFont("Tahoma", 65));
QTextEdit *text = new QTextEdit(QObject::trUtf8("ﻡ ﺍ"));
causes Segmentation fault.
running the program from within gdb shows
[Thread debugging using libthread_db enabled]
[New Thread -1219934528 (LWP 9811)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1219934528 (LWP 9811)]
0xb7c2f9d3 in QX11PaintEngine::drawFreetype (this=0x868e460, p=@0xbf8005f0,
si=@0xbfffdd20)
at painting/qpaintengine_x11.cpp:1965
1965 {
(gdb) bt
#0 0xb7c2f9d3 in QX11PaintEngine::drawFreetype (this=0x868e460,
p=@0xbf8005f0, si=@0xbfffdd20)
at painting/qpaintengine_x11.cpp:1965
#1 0xb7c2e6c6 in QX11PaintEngine::drawTextItem (this=0x868e460,
p=@0xbf8005f0, textItem=@0xbfffdd20)
at painting/qpaintengine_x11.cpp:1692
...
--
Munzir Taha PGP Key available
gpg --recv-keys --keyserver www.mandrakesecure.net F0671821
Telecommunications and Electronics Engineer
Maintainer of the OpenBugs project page at
http://www.arabic-fedora.org/munzir/OpenBugs.html
Maintainer of Fedora Arabic Translation Project
https://listman.redhat.com/mailman/listinfo/fedora-trans-ar
Master CIW Designer, ICDL, MOUS, Linux+, LPI 101
New Horizons CLC, Riyadh, SA
18 years, 11 months
RE: Arabic issue #32: The conversion of a localized 'const QString' to 'double' returns 0
by Puetz Kevin A
Right. The problem is occurring when going from const char * to QString, not when going from QString to int (which is properly locale dependent when using QLocale::toDouble). comma is in latin-1, so there's no problem. ١٢٣ is not latin-1, so won't transcode it to utf16 correctly unless it's been told to do something else.
And yes, I suspect the reason for latin1 as the standard 8bit codec is performance: latin-1 is identical to the first 256 code points of utf16, so the processing required to 'cast' 8bit const char * to utf16 QString this way is thus minimized. QString::from* methods are provided for several other common codecs (utf8 among them) to make it easy to be explicit (and there's the QT_NO_CAST_ASCII macros to force you to always be explicit), and QTextCodec for all the rest.
> -----Original Message-----
> From: Munzir Taha [mailto:munzirtaha@newhorizons.com.sa]
> Sent: Saturday, May 07, 2005 2:59 PM
> To: qt4-preview-feedback(a)trolltech.com
> Cc: Puetz Kevin A; fedora-trans-ar(a)redhat.com
> Subject: Re: Arabic issue #32: The conversion of a localized
> 'const QString' to 'double' returns 0
>
> On Yaum al-Sabt 28 Rabi` al-Awal 1426 01:54, you wrote:
> > I would say that depends on whether or not you've called
> > QTextCodec::setCodecForCStrings() to tell it bare const char * and
> > QByteArray should be interpreted as utf-8 (I believe the default is
> > latin-1, but I'd probably be explicit if I was using anything other
> > than ascii).
>
> Thanks a lot Puetz for your reply but what's confusing me is if I can
> QLocale::setDefault(QLocale::German);
> d = QString( "1234,56" ).toDouble(&ok); // ok == true, d
> == 1234.56 without calling QTextCodec::setCodecForCStrings()
> or trUtf8, why not for QLocale::Arabic? Is this because the
> German comma is within ascii range? Is this justified? Is it
> for performance reasons that the default is latin-1 and not utf8?
>
> > > > QLocale ar(QLocale::Arabic);
> > > > double d = ar.toDouble( "١٢٣" );
>
> > > Now I found if I do it like this:
> > > d = arabic.toDouble(QObject::trUtf8("١٢٣"));
> > >
> > > It works! Should I consider this bug as invalid?
>
>
> --
> Munzir Taha PGP Key available
> gpg --recv-keys --keyserver www.mandrakesecure.net F0671821
>
> Telecommunications and Electronics Engineer Mandrake Club
> Member Maintainer of the OpenBugs project page at
> http://www.arabic-fedora.org/munzir/OpenBugs.html
> Maintainer of Fedora Arabic Translation Project
> https://listman.redhat.com/mailman/listinfo/fedora-trans-ar
> Master CIW Designer, ICDL, MOUS, Linux+, LPI 101 New Horizons
> CLC, Riyadh, SA
>
>
18 years, 12 months