[Catalyst] Catalyst Unicode

2014-01-31 Thread Christian Lackas
Hi Everybody, I noticed that paramters in my Catalyst application are not automatically decoded to UTF-8, although I use use Catalyst qw/ ... Unicode::Encoding ... /; __PACKAGE__-config( ... encoding = 'UTF-8', ... ); I tracked

Re: [Catalyst] Catalyst Unicode

2014-01-31 Thread David Schmidt
https://metacpan.org/pod/release/JJNAPIORK/Catalyst-Runtime-5.90053/lib/Catalyst/Upgrading.pod#Catalyst::Plugin::Unicode::Encoding-is-now-core and in your test script, im pretty sure if you are using unicode chars in your perl code you have to use utf8 in it. also, use warnings instead of perl

Re: [Catalyst] Catalyst Unicode

2014-01-31 Thread Christian Lackas
* Christian Lackas christ...@lackas.net [140131 06:33]: Hi Everybody, sorry, has to be $t = $encoding-decode($t); below, of course (and then it works in the test). That said, in my application I have: my $file = $c-request-param('file'); warn is_utf8: , utf8::is_utf8($file), \n;

Re: [Catalyst] Catalyst Unicode

2014-01-31 Thread Will Crawford
On 31 January 2014 11:53, Christian Lackas christ...@lackas.net wrote: ... That said, in my application I have: my $file = $c-request-param('file'); warn is_utf8: , utf8::is_utf8($file), \n; and see that $file has not been decoded to UTF-8, although debug lines in

Re: [Catalyst] Catalyst Unicode

2014-01-31 Thread Christian Lackas
* David Schmidt davew...@gmx.at [140131 06:53]: Dear David, thanks for your prompt reply. If I use 'use utf8', I already tell Perl that all literals are in UTF-8, and thus would not need to decode manually at all (as you see in your output it already says is_utf8 even before you decode

Re: [Catalyst] Catalyst Unicode

2014-01-31 Thread Aristotle Pagaltzis
* Will Crawford billcrawford1...@gmail.com [2014-01-31 13:05]: If the string has been decoded *from* UTF-8 to Perl's internal representation, it's *not* going to be marked as UTF8 internally; it *shouldn't* be. It's no longer a UTF8 string but a Unicode string, complete with wide characters.

Re: [Catalyst] Catalyst Unicode

2014-01-31 Thread Bill Moseley
On Fri, Jan 31, 2014 at 3:58 AM, Will Crawford billcrawford1...@gmail.comwrote: If the string has been decoded *from* UTF-8 to Perl's internal representation, it's *not* going to be marked as UTF8 internally; it *shouldn't* be. It's no longer a UTF8 string but a Unicode string, complete with

Re: [Catalyst] Catalyst Unicode

2014-01-31 Thread Will Crawford
Yes, I got the wrong end of the stick. Sorry (repeatedly :)). On 31 January 2014 15:03, Bill Moseley mose...@hank.org wrote: On Fri, Jan 31, 2014 at 3:58 AM, Will Crawford billcrawford1...@gmail.com wrote: If the string has been decoded *from* UTF-8 to Perl's internal representation,