From kde-core-devel Fri Jul 04 10:21:54 2003 From: Thiago Macieira Date: Fri, 04 Jul 2003 10:21:54 +0000 To: kde-core-devel Subject: Re: [Issue N23835] [PATCH] Files with non-utf8 names unaccessible X-MARC-Message: https://marc.info/?l=kde-core-devel&m=105731424516065 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-02=_UVVB/A79PNazGgT" --Boundary-02=_UVVB/A79PNazGgT Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Waldo Bastian wrote: >> I've implemented a slightly different solution mapping the characters to >> a surrogate pair in the supplementary private use area, as this should >> hopefully lead to less conflicts. The only disadvantage is that >> currently (until we have a better surrogate handling in Qt) each of >> these characters will show up as two boxes instead of one box and the >> char mapped from latin1. The diff against qt-3.2 beta2 is attached. > >I don't think this is very bad, since the character may very well not be >latin1 either anyway. Not using 0xfffd may give problems wrt compatibility >though: currently a Qt application could check if a QString contains 0xfffd >to decide whether the string used as input was valid utf8. I don't think >QString provides another way to check if utf8 conversion was/will be >successful. This may solve only half of our problems. The decodeFilename call is supposed to convert a given 8-bit character=20 sequence into a unique Unicode representation, so that it can be used for=20 displaying in widgets and titlebars. It's also necessary that this encoding= ,=20 whatever it may be, gets us the original 8-bit character sequence when doin= g=20 encodeFilename. That is, apparently, solved. However, the second part of the problem is what I'm worried about: I need t= o=20 specify the encoding to be tried for the original string. And the attached= =20 patch deals with UTF-8 only, but some other encodings might fail as well. M= y=20 situation is that of bug #56197, in which we have to try different encoding= s=20 given the user's selection in a menu. =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=_UVVB/A79PNazGgT Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQA/BVVUM/XwBW70U1gRAsQ0AJ4/eRQJCKEPlYOGN6DudKzF7vtkzACeKaPp ZlcWG3aLugvzHyhsrez55Nk= =8Jyc -----END PGP SIGNATURE----- --Boundary-02=_UVVB/A79PNazGgT--