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

List:       kde-core-devel
Subject:    Re: Problem with encodings in several places in KDE
From:       Thiago Macieira <thiago.macieira () kdemail ! net>
Date:       2003-11-21 22:00:37
[Download RAW message or body]


Thiago Macieira wrote:
>The side-effect of this is that the UTF-8 codec can now decode any string,
>which is not the correct behaviour. For instance, Kopete relies on the
>decoding of the UTF-8 message to determine if it was properly encoded (see
> BR 67727). Besides, this doesn't solve all the problems: other encodings
> might fail the same way UTF-8 does, which still renders broken filenames
>inoperable. My second request in
>http://lists.kde.org/?l=kde-core-devel&m=105731424516065&w=2 isn't solved
>either.
[snip]
>
>My proposal:
>to solve all of those problems and to erradicate the side-effect, a
>non-trivial fix is required. First of all, the patch to Qt from issue N23835
>should be reverted, making UTF-8 completely legal again.

Another reason for requesting the reversal of the patch:

I've received an e-mail in KMail which the sender did not encode properly, so 
KMail is nice to me and tries to decode using my locale (UTF-8). That means, 
however, that all those invalid characters become two squares in the message 
preview pane and in the composer window when replying.

The big problem comes with the replying, since those two characters will be 
converted back to their original one-byte value. That means KMail generates 
invalidly-coded UTF-8 messages without even knowing about it.

As for the proposal to use a character tag in decoding those invalid 
filenames, special care must be taken in KURL and in the rename widget so 
that this character is removed.

It seems to me that the best solution overall (for both Qt4 and KDE4) is to 
have a specialised class to deal with a filename -- such as QUrl and KURL, 
since an URL can perfectly represent those invalid sequences. 

-- 
  Thiago Macieira  -  Registered Linux user #65028
   thiagom@mail.com           
    ICQ UIN: 1967141   PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

[Attachment #3 (application/pgp-signature)]

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

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