[Catalyst] ajax character encoding issue solved, but WHY?
Francesc Romà i Frigolé
francesc.roma+catalyst at gmail.com
Fri Jun 19 15:51:38 GMT 2009
On Fri, Jun 19, 2009 at 6:23 AM, <seasprocket at gmail.com> wrote:
> The problem was fixed by calling utf8::decode on the data prior to sending
> back via ajax. BUT WHY?
> I am using the JSON view to render ajax responses, and it sets the charset
> header correctly to UTF-8. Of course, even when you decode, perl still
> represents as "internal" utf8. But why should this be necessary?
I had exactly the same problem and solution using Catalyst::Controller::REST
with the JSON serializer. Still in my list of 'big mysteries to be solved'.
I hadn't discovered Catalyst::Plugin::Unicode back then, I wonder if using
it would help, haven't tried myself yet.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Catalyst