Thank you, it works! by using Encode::encode(UTF-8, 'my text' ).
And just for reference, if anyone will use it, HTTP headers should be set
BEFORE calling write_fh.
e.g.
$c-res-header( 'Cache-Control' = 'public, max-age=600' );
my $fh = $c-res-write_fh; # psgi writer, not filehandle
On Friday, February 21, 2014 7:25 AM, Sergey Dmitriev
sergey.program...@gmail.com wrote:
Thank you, it works! by using Encode::encode(UTF-8, 'my text' ).
And just for reference, if anyone will use it, HTTP headers should be set
BEFORE calling write_fh.
e.g.
$c-res-header(
Hello,
I'm trying to put some utf8 strings as a part of Catalyst response as
follows:
$c-res-print ( ... )
and
$c-res-write( ... )
line by line.
However it dies with
Wide character in syswrite at . IO/Handle.pm line 474
Any ideas how can utf8 be written to response?
E.g. set binmode
use utf8;
my $fh = $c-res-write_fh;
my $test = \x{41f}\x{440}\x{43e}\x{431}\x{430};
utf8::encode($test);
$fh-write($test);
On 20 February 2014 17:45, Sergey Dmitriev sergey.program...@gmail.com wrote:
Hello,
I'm trying to put some utf8 strings as a part of Catalyst response
On Feb 20, 2014, at 2:19 PM, Dmitry L. dim0...@gmail.com wrote:
use utf8;
You shouldn’t need this unless you have actual utf8 characters (rather than
escapes) in your source code.
my $fh = $c-res-write_fh;
my $test = \x{41f}\x{440}\x{43e}\x{431}\x{430};
utf8::encode($test);