From kde-core-devel Mon Sep 01 07:03:19 2008 From: Thiago Macieira Date: Mon, 01 Sep 2008 07:03:19 +0000 To: kde-core-devel Subject: Re: Encoding problem in the file ioslave Message-Id: <200809010903.20222.thiago () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=122025274322870 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart13004396.G4HBddijvR" --nextPart13004396.G4HBddijvR Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thiago Macieira wrote: >Also remember that Windows (we seem to care about that platform now, >right?) uses Unicode to store filenames. If you convert from Unicode to >8-bit, make sure you're using UTF-8, not the local encoding for that >platform, or use URLs. So in the everywhere above where you converted >from QFile to the non-Win32 functions, be sure to use the local encoding >on Unix, but UTF-8 on Windows. Of course... Windows 8-bit APIs always use the local encoding, so you need= =20 to use the Unicode non-POSIX API to be able to open those files. (i.e.,=20 use CreateFileW to open the file; I don't know if they provide a _wopen=20 or _wfopen) Also remember that use of QStrings to mean filenames is widespread in Qt=20 and KDE code. You have to convert *all* of those to QByteArray. =2D-=20 =A0 Thiago Macieira =A0- =A0thiago (AT) macieira.info - thiago (AT) kde.org =A0 =A0 PGP/GPG: 0x6EF45358; fingerprint: =A0 =A0 E067 918B B660 DBD1 105C =A0966C 33F5 F005 6EF4 5358 --nextPart13004396.G4HBddijvR Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQBIu5O4M/XwBW70U1gRAkTtAJ9V6RKRX8RTTmCiIFFh0IhNQWr3CACgiO5W y3/Lic/Nofv9IoaAOTd3zis= =TQn8 -----END PGP SIGNATURE----- --nextPart13004396.G4HBddijvR--