From kde-core-devel Fri Nov 21 22:00:37 2003 From: Thiago Macieira Date: Fri, 21 Nov 2003 22:00:37 +0000 To: kde-core-devel Subject: Re: Problem with encodings in several places in KDE X-MARC-Message: https://marc.info/?l=kde-core-devel&m=106945217507399 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-02=_Fsov/K81YOK+hV4" --Boundary-02=_Fsov/K81YOK+hV4 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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=3Dkde-core-devel&m=3D105731424516065&w=3D2 isn't s= olved >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 N238= 35 >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=20 KMail is nice to me and tries to decode using my locale (UTF-8). That means= ,=20 however, that all those invalid characters become two squares in the messag= e=20 preview pane and in the composer window when replying. The big problem comes with the replying, since those two characters will be= =20 converted back to their original one-byte value. That means KMail generates= =20 invalidly-coded UTF-8 messages without even knowing about it. As for the proposal to use a character tag in decoding those invalid=20 filenames, special care must be taken in KURL and in the rename widget so=20 that this character is removed. It seems to me that the best solution overall (for both Qt4 and KDE4) is to= =20 have a specialised class to deal with a filename -- such as QUrl and KURL,= =20 since an URL can perfectly represent those invalid sequences.=20 =2D-=20 Thiago Macieira - Registered Linux user #65028 thiagom@mail.com =20 ICQ UIN: 1967141 PGP/GPG: 0x6EF45358; fingerprint: E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358 --Boundary-02=_Fsov/K81YOK+hV4 Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQA/vosFM/XwBW70U1gRAgiiAKCqMfWQW/Eb+xd8c7Dgj+eEvywx+QCfYtMP qJdK54EB354Jgk8sGr169YY= =RvT7 -----END PGP SIGNATURE----- --Boundary-02=_Fsov/K81YOK+hV4--