[Catalyst] Catalyst Unicode

Will Crawford billcrawford1970 at gmail.com
Fri Jan 31 11:58:50 GMT 2014

On 31 January 2014 11:53, Christian Lackas <christian at 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 _handle_param_unicode_decoding() show that the value is passed
> through there.
> What else could cause this issue here?

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. If anything, the internal "UTF8" flag
means "this string needs decoding" rather than "has been decoded".

More information about the Catalyst mailing list