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

List:       kde-core-devel
Subject:    Re: Encoding problem in the file ioslave
From:       Thiago Macieira <thiago () kde ! org>
Date:       2008-09-01 7:03:19
Message-ID: 200809010903.20222.thiago () kde ! org
[Download RAW message or body]


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

["signature.asc" (application/pgp-signature)]

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

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