[Catalyst] Catalyst crashing hard with UTF-8 string
Paul Makepeace
paulm at paulm.com
Wed Jul 8 02:07:38 GMT 2009
I'm uploading utf-8 news feed data through a web form, processing it
and reporting back to the user errors that are encountered during a
news feed parse. In those error reports I'm including snippets of the
input data via TT,
[% IF telluser.error %]
<p class = "error">
[% FOREACH error_msg = telluser.error %]
[% TRY %]
[% error_msg %]
[% CATCH %]
Error printing message
[% END%]
<br />
[% END %]
</p>
[% END %]
It turns out that if a UTF-8 string is in error_msg the backend
request completely dies (I get a Proxy Error "Reason: Error reading
from remote server"), even with use Catalyst /-Debug/ and that [% TRY
%] block. I know it's UTF-8 because Encode::is_utf8 says so, and warn
"$string" is showing up in the terminal correctly. The string contains
a right single quote (E2 80 99): If I do [% error_msg | html_entities
%] it is successfully converted to ’. Altho unfortunately so are
the HTML tags...
Something's definitely changed wrt to UTF-8 behavior since we did our
big upgrade from Catalyst 5.7. Are there any 'known gotchas' I could
check?
At this point my debugging fu runs out--help appreciated on where to look next.
Paul
More information about the Catalyst
mailing list