[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: What type of encoding to use for text stored in files?
From: David Faure <david () mandrakesoft ! com>
Date: 2002-06-26 21:56:55
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 26 June 2002 23:27, David Jarvie wrote:
> I notice that in kdepim/libkcal, various strings such as event description,
> summary, attendee, location are converted using QString::local8Bit() before
> being stored in the calendar file. However, this means for example that if
> someone using a Western European locale enters a description in Cyrillic, it
> is stored incorrectly. Using QString::utf8() causes the string to be stored
> correctly so that it can be retrieved and displayed as a Cyrillic string
> again.
>
> When should local8Bit() be used, and when should utf8() be used for storing
> strings in files?
Use local8Bit if other, non-kde, from old times, tools need to read the files.
Use utf8 if all tools that will have to read this file support utf8 (it's a much
nicer solution indeed, for the reasons you mention).
Even text console tools seem to handle utf8 now (e.g. vi), so if this is about
a new file format, I would strongly advise to choose utf8.
- --
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KOffice-1.2-beta2 is coming very shortly...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9Gjin72KcVAmwbhARAiwYAKCs02Wh5qvb2kmtD+d0Oyx0JNjZXwCgiXJ/
6FKR22IpP+Fu8ZZB546R8x8=
=LBOF
-----END PGP SIGNATURE-----
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic