[Catalyst] Re: Avoiding UTF8 in Catalyst

Bill Moseley moseley at hank.org
Mon Nov 23 19:08:04 GMT 2009


On Mon, Nov 23, 2009 at 10:14 AM, Aristotle Pagaltzis <pagaltzis at gmx.de>wro=
te:

>
>
>
> Encode the string to the destination encoding (not just character
> set), so that the string represents an encoded octet stream, and
> then look at the plain old character length of that string. That
> will always give you the right answer, regardless of whether that
> string is packed bytes or variable-width integers.
>

Correct.  And I'd argue that when it's time to set the length it should die
if utf8 flag is still set.

When calculating the length the content should have already been encoded.

Again, at some point decoding and encoding  should be core not just a
plugin.  It's an important part of the request cycle.



-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20091123/80098=
040/attachment.htm


More information about the Catalyst mailing list