[Catalyst] Fix for content-length issue introduced with Catalyst 5.8.x

Dominic Germain mailinglists at sogetel.com
Thu Feb 16 03:56:47 GMT 2012


No, we are not using Catalyst::Plugin::Unicode::Encoding


Dominic Germain
---------------------------------------------
Administrateur r=E9seau / Network administrator
Sogetel
www.sogetel.net

mailinglists at sogetel.com



Le 12-02-15 =E0 22:25, Bill Moseley a =E9crit :

> =

> =

> On Thu, Feb 16, 2012 at 9:51 AM, Dominic Germain <mailinglists at sogetel.co=
m> 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 co=
nfigured 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 Cat=
alyst 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 e=
xamples.  Previously, "bytes::length" was used and it works fine but the co=
de was changed to just "length".
> =

> Which is correct.  length() on encoded content is the length in bytes.  B=
ut, if you are not encoding it will be wrong.
> =

>  =

> =

> -- =

> Bill Moseley
> moseley at hank.org
> _______________________________________________
> List: Catalyst at 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.u=
k/
> Dev site: http://dev.catalyst.perl.org/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120215/c0680=
ec2/attachment.htm


More information about the Catalyst mailing list