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.
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 "é", "ê", 'è", "à", etc. are good examples.
Previously, "bytes::length" was used and it works fine but the code was changed
to just "length".
Because of that, if I have 100 accentuated characters in the body, the last 100
characters will be chopped by all browsers that are taking care of
content-length (Chrome and Safari for example). It seems that FF doesn't care
about content-length, it displays everything. Don't know about IE.
reverting back to the old way does the trick...
Catalyst.pm version 5.90007 line 1886
> else {
> # everything should be bytes at this point, but just in case
> $response->content_length( length( $response->body ) );
> }
fix inspired from 5.7 branch
> else {
> # everything should be bytes at this point, but just in case
> $response->content_length( bytes::length( $response->body ) );
> }
I hope this will be fixed in a future release. It seems that there is some
people complaining about that.
regards,
Dominic Germain
---------------------------------------------
Administrateur réseau / Network administrator
Sogetel
www.sogetel.net
[email protected]
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/