[PATCH] UTF-8 encoded tips files

Waldo Bastian bastian at kde.org
Thu Apr 29 17:12:20 BST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu April 29 2004 17:28, Adriaan de Groot wrote:
> KOrganizer's tips file is UTF-8 encoded; it uses î to encode
> the "registered trademark" symbol after the word Microsoft. 
> I suppose that's how it should be (UTF-8 encoding). 

You mean it contains two bytes equal to à and ® resp? It doesn't 
contain the string "î" I may hope?

> However, KTipDialog displays this 
> as two separate characters. The attached patch (against BRANCH) fixes this
> by interpreting the tips file explicitly as UTF-8. OK to commit? (And
> forward-port?)

I think it should be:

 QByteArray data = file.readAll();
 QString content = QString::fromUtf8(data.data(), data.size());

Cheers,
Waldo
- -- 
bastian at kde.org  |   SUSE Linux 9.1 Order Now!   |  bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAkSlkN4pvrENfboIRAry5AJ95Vp2LPStGnhH5gQzNT9IuDRq4rgCfbWgO
sNl4aAyQJ5520mAa01iesWk=
=8IPB
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list