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

List:       kde-devel
Subject:    Re: Detecting invalid encoded filenames (UTF-8 locale)
From:       Thiago Macieira <thiago () kde ! org>
Date:       2005-12-11 0:54:23
Message-ID: 200512102254.24592.thiago () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Sebastian Trueg wrote:
>> When we do QFile::decodeName on one such file, the resulting QString
>> contains some private characters that have no meaning outside Qt.
>
>Do you remember how I can find these?

They are in the 0xD800-0xDFFF range: each pair represents one character 
that wasn't converted correctly.

Also, remember this works ONLY in UTF-8 locales. Any other locale will not 
show this behaviour.

>yes, sure. But I still need to detect the invalid filenames so the user
> won't get some error in the burning process and files a bug report.

Take a look at QString to find out which range it uses in the surrogates 
(the D800-DFFF). In the future, QString could change to use surrogates 
for other purposes.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

5. Swa he géanhwearf tó timbran, and hwonne he cóm, lá! Unix cwæð "Hello, 
World". Ǽfre ǽghwilc wæs glæd and seo woruld wæs fréo.

[Attachment #5 (application/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