[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: HOWTO: Deal properly with internationalisation in Qt 2 and KDE 2 code
From:       Vadim Plessky <lucy-ples () mtu-net ! ru>
Date:       2000-11-28 15:07:34
[Download RAW message or body]

28 ?????? 2000 01:35, David Faure ???????:
> "Sergey A. Sukiyazov" <ssukiyazov@freemail.ru> wrote this nice summary
> of common problems with the way US or European developers write
> Qt/KDE code, leading to many problems for users of other encodings.
> Those who already know most of this stuff should still have a look at
> the bit about QTextStream (section 3), I was quite surprised to learn that
> its default conversion depends on the underlying device...

Thanks, Sergey! I hope we will have finally KDE2 supporting Russian (and 
other non-Latin-1,2) language in KWord, etc.
I was testing different application on subject of Russian language support, 
and Kmail & Konqueror are *most-friendly* at a moment. KWord has problem even 
with trivial Cut and Paste in document. (see bug #15514)
 See also related bugs 14657,  14582, 14583, 14584, 14496.

>
> Glossary
> =========
>
> * "local8bit": the correct encoding for a given country (Qt chooses
> what local8bit does depending on $LANG and $LC_CTYPE).
> This encoding defines other characters (esp. in the range 128-255),
> that are needed by a given country/language.
> Sergey also calls them the "National characters".
>
> * utf8/utf16: Encodings for "Unicode", i.e. finally, an encoding that
> doesn't depend on the country. In Unicode, each code means a single
> character, which is why unicode is the real long term solution to this
> mess... if only there were Unicode fonts... :)

First, thank for explanation. I always was wondering from where "the correct 
encoding for a given country " is taken. (I want to have CP1251 encoding for 
fonts, if not UTF8, but only KOI8-R / ISO 8859-5 are listed in font selection 
dialog boxes)

About UNICODE fonts:
-----------------------------------------
Standard MS Windows 98 fonts are UNICODE.
You can download them for free at: www.microsoft.com/typography/
http://www.microsoft.com/typography/web/default.htm
/if you don't want to visit MS site, write to me off-list; I have some fonts 
already unpacked.  MS provides fonts in .exe self-extracting archive, you 
need DOS/Windows to extract them.  /
you can see all glyphs (it has 1295 glyphs!) from Arial rendered here , using 
FreeType library:
http://kde2.newmail.ru/font_test_arial.html

> QString stores everything in Unicode, so for any text displayed in the GUI
> there's no need to take any special action. What is tricky, is to know how
> to convert this to the right encoding when interfacing with the file
> system, when storing data somewhere, etc.
>
If it's possible to use Unicode as standard for all applications - let's use 
it. Unicode is default in Windows 2000, and MS is also moving to Unicode from 
CP125x, etc. presentedin Windows 9x.  Witzler will use Unicode as well. 

>
>        Furthermore, it is nessesary to compile programs with Qt-2.X.X with
>        option -DQT_NO_ASCII_CAST in order to prevent automatic use of
> method .latin1() to translate QString into (const char*). It may be
> possible that program compilation aborts with the error, for example:
>

Can somebody advise where I should put this option?
(prefered way - rebuilding source rpm with necessary option to get it working)
>
>        [Note: KDE's compilation system defines -DQT_NO_ASCII_CAST by
> default] The above example applies to all translations from UNICODE to
>
>
>        Thanks for spreading these reasons among all programmers
>        writing programs for KDE or simply Qt, so that in the future we can
>        minimize the manifestation of these troubles.
>
> Best regards
> Sukiyazov Sergey <corwin@dstu.rnd.runnet.ru>
>                  <ssukiyazov@freemail.ru>

-- 

Vadim Plessky
http://kde2.newmail.ru  (English)
http://kde2.newmail.ru/index_rus.html  (Russian)
Do you have Arial font installed? Just test it!
http://kde2.newmail.ru/font_test_arial.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic