Re: Function truncateWithEntities() made multibyte-aware

Paul Lesniewski <[email protected]>
Newsgroups gmane.mail.squirrelmail.devel
Message-ID <[email protected]>
On Tue, Jan 19, 2010 at 2:26 AM, Alexandros Vellis <[email protected]> wrote:
> 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.

I intend to follow up on this issue, but will have to do so later.

-- 
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php

------------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.