Re: Function truncateWithEntities() made multibyte-aware
Alexandros Vellis <[email protected]>
| Newsgroups | gmane.mail.squirrelmail.devel |
|---|---|
| Organization | National and Kapodistrian University of Athens |
| Message-ID | <20100119122631.1d2ea4aa@hp> |
On Mon, 18 Jan 2010 21:33:31 -0600 Jonathan Angliss <[email protected]> wrote: > Without digging too much into the code, is this called using the SM > users' encoding settings, or is it called using the message's > encoding? The problem appears when one uses a language that uses UTF-8 (or other multibyte) charset in Squirrelmail. So as regards your question, it has to do with SM user's language and therefore encoding setting. If any other charset is used in Squirrelmail, *no matter what the message's charset is*, then these characters are converted to entities, and truncate function is aware of them, so no problem there. However, if "raw" UTF-8 is used in Squirrelmail, then this function must be made multibyte-aware, or else: * the subject will be cut to about half of the actual characters resulting in an uneven truncation. * there is a risk of cutting half of a UTF-8 control characer, resulting in all sorts of ugly displays and (probably?) security issues. I'm guessing that UTF-8 could be translated to entities as well, but that's taking the long way round to this problem, IMHO. Alexandros ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev ----- squirrelmail-devel mailing list Posting guidelines: http://squirrelmail.org/postingguidelines List address: [email protected] List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAktViNcACgkQRf/eMaHkh6pN/ACdH0z/S8sAS2FK9Dv2w7r935F9 fWoAoIIwXl8xH6rXlPmTWUYh9pOOXnu1 =4bt3 -----END PGP SIGNATURE-----