Skip Menu |

This queue is for tickets about the FCGI CPAN distribution.

Report information
The Basics
Id: 54247
Status: rejected
Priority: 0/
Queue: FCGI

People
Owner: Nobody in particular
Requestors: slynko [...] tronet.ru
Cc: bobtfish [...] bobtfish.net
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Wide character in FCGI-0.68_02
Date: Wed, 03 Feb 2010 13:52:56 +0300
To: bug-FCGI [...] rt.cpan.org
From: Alexey Slynko <slynko [...] tronet.ru>
Hi, I've tried to use new version, but it's doesn't work in my situation. Example: #!/usr/bin/perl use strict; use warnings; use encoding 'utf8'; use CGI::Fast; use CGI::Carp qw/fatalsToBrowser/; my ($cgi); while ($cgi = new CGI::Fast) { $cgi->charset("utf-8"); my $title = "\x{0100}\x{DF}\n";; print $cgi->header(), $cgi->start_html( -title=>$title ), $cgi->end_html(); } This simple code produce an error: Wide character in FCGI::Stream::PRINT at ./fcgi2.pl line 16.
On Wed Feb 03 06:14:20 2010, slynko@tronet.ru wrote: Show quoted text
> Hi, > > I've tried to use new version, but it's doesn't work in my situation. > > Example: > > #!/usr/bin/perl > > use strict; > use warnings; > use encoding 'utf8'; > > use CGI::Fast; > use CGI::Carp qw/fatalsToBrowser/; > > my ($cgi); > > while ($cgi = new CGI::Fast) { > $cgi->charset("utf-8"); > > my $title = "\x{0100}\x{DF}\n";;
You are trying to output perl's internal UTF-X format, since it contains code points above 0xFF (0x100) it can't be downgraded (utf8_downgrade). use encoding 'utf8'; has no effect on FCGI.XS since it's using TIEHANDLE Show quoted text
> print $cgi->header(), > $cgi->start_html( > -title=>$title > ), > $cgi->end_html(); > } > > This simple code produce an error: > > Wide character in FCGI::Stream::PRINT at ./fcgi2.pl line 16.
Yeah, so your code was broken before, but it's now showing up as FCGI started caring about doing the right thing, rather than just assuming everything is bytes. You need to encode your output correctly if you're using non ascii...