Tere!

2014-06-26 16:49 GMT+03:00 Warren Young <[email protected]>:

I'm getting data corruption when a UTF-8 encoded web page sends form data
> back to Dancer via POST.
>
> ...

2. Add a POST handler route to utf8form/lib/utf8form.pm:
>
>   post '/submit' => sub {
>       debug "Got '", param('field'), "' from form.";
>   };
>
>
Actually, your code uses here STDERR and seems to me, that Dancer does not
take care of it, so in your ./bin/app.pl you should add this:

  binmode(STDERR, ":encoding(UTF-8)");

But this cures only STDERR, for any other output you may have, you must
take care same or similar way. I assume, in views you see UTF-8 correctly.
At least I saw with your testcase.

-- 
Wbr,
Kõike hääd,

Gunnar
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to