Encoding problem in the file ioslave

Thiago Macieira thiago at kde.org
Sun Aug 31 23:49:16 BST 2008


Albert Astals Cid wrote:
>Debugging a bit i've found that in KDE3 QFile::decodeName("C�digo")
> gives us a QString whose char unicode values are
>67 255 243 100 105 103 111
>but in KDE 4 we get
>67 253 100 105 103 111
>
>Any idea on how to solve that? It's a Qt bug? Or should we store the
>QByteArray of the path in UDSEntry without converting to QString?

Neither string you pasted are UTF-8. And your email was UTF-8 encoded but 
the character missing was replaced on your end. If the second one is 
Latin1, the file is named "Cýdigo".

I'm guessing it should have been "Código", i.e. 67 243 100 105 103 111.

That's confirmed by downloading the file and listing it with tar in 
konsole:

$ tar -tvf attachment.cgi\?id=25631
drwxr-xr-x knuckles/users    0 2008-06-26 13:31 Bug/
drwxr-xr-x knuckles/users    0 2008-06-26 13:32 Bug/C\363digo/
-rw-r--r-- knuckles/users    0 2008-06-26 13:32 
Bug/C\363digo/someotherfile.txt
drwxr-xr-x knuckles/users    0 2008-06-26 13:32 Bug/Relat\363rio/
-rw-r--r-- knuckles/users    0 2008-06-26 13:32 
Bug/Relat\363rio/somefile.txt

(0363 in octal is 243 in decimal)

But as you can see from tar itself, the files are not properly encoded to 
my locale (UTF-8). We removed the compatibility code in QString in Qt 4.3 
after several years there to support the conversion to UTF-8.

It's time people stopped using legacy encoding. The tar file bugzilla is 
broken. We don't have to support it.

-- 
  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/0576e1b2/attachment.sig>


More information about the kde-core-devel mailing list