On Mon, Nov 23, 2009 at 10:14 AM, Aristotle Pagaltzis <pagalt...@gmx.de>wrote:

>
>
>
> 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
mose...@hank.org
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to