[Catalyst] Fix for content-length issue introduced with Catalyst
5.8.x
Bill Moseley
moseley at hank.org
Thu Feb 16 03:25:22 GMT 2012
On Thu, Feb 16, 2012 at 9:51 AM, Dominic Germain
<mailinglists at sogetel.com>wrote:
> Hi,
>
> We just update from Catalyst 5.7.x to Catalyst 5.90007.
>
> All our apps code and our DBs are in ISO-8859-1 encoding. View::TT is
> configured to output stuff as UTF-8 and everything is working fine until
> the update. It means that there is some re-encoding occurring somewhere =
in
> Catalyst View processing.
>
Are you using Catalyst::Plugin::Unicode::Encoding? Are you decoding all
your templates and data on input?
>
> The problem is quite simple: Catalyst is unable to figure out the right
> content-length as soon we have characters that requires two bytes in UTF-=
8.
> French accent characters like "=E9", "=EA", '=E8", "=E0", etc. are good =
examples.
> Previously, "bytes::length" was used and it works fine but the code was
> changed to just "length".
>
Which is correct. length() on encoded content is the length in bytes.
But, if you are not encoding it will be wrong.
-- =
Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120216/5aeb8=
080/attachment.htm
More information about the Catalyst
mailing list