Encoding problem in the file ioslave
Thiago Macieira
thiago at kde.org
Mon Sep 1 08:03:19 BST 2008
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
to use the Unicode non-POSIX API to be able to open those files. (i.e.,
use CreateFileW to open the file; I don't know if they provide a _wopen
or _wfopen)
Also remember that use of QStrings to mean filenames is widespread in Qt
and KDE code. You have to convert *all* of those to QByteArray.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080901/c660403c/attachment.sig>
More information about the kde-core-devel
mailing list