[dancer-users] UTF-8 in form POST
wanradt at gmail.com
Fri Jun 27 19:24:12 BST 2014
2014-06-27 16:55 GMT+03:00 Warren Young <warren at etr-usa.com>:
> I think Dancer::Logger::Console should do that when config.yml contains
> charset: "UTF-8".
> My test case boiled things down too far. My real issue was different. It
> was yet another case of me thinking Perl somehow tags strings with their
> source encoding, so that data coming from a UTF-8 source and going out to a
> UTF-8 sink wouldn't need translation. I needed to add an explicit
> encode('utf-8', $s) wrapper to that code path.
I have had lot problems with UTF-8. I think, main point which made things
simpler for me:
Perl uses internally _unicode_ strings. So everything coming in or going
out needs decoding or encoding. Without explicitly doing so, all strings
are treated as being ASCII/Latin1 encoded.
For me main problem is: in core is nothing to turn every input/output
automatically convert from/to utf-8. Every user has to write pretty boring
boilerplate to cover all possibilities. I use utf8::all for this, but some
are criticizing it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dancer-users