26 Jun
2014
26 Jun
'14
3:10 p.m.
Tere! 2014-06-26 16:49 GMT+03:00 Warren Young <warren@etr-usa.com>: 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