This queue is for tickets about the Catalyst-Runtime CPAN distribution.

Report information
The Basics
Id:
32276
Status:
rejected
Priority:
Low/Low

People
Owner:
Nobody in particular
Requestors:
rabbit+bugs [...] rabbit.us
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Incorrect handling of unicode with the test server
Date: Sun, 13 Jan 2008 14:05:51 +0100
To: bug-Catalyst-Runtime@rt.cpan.org
From: Peter Rabbitson <rabbit+bugs@rabbit.us>
Hi, The test server (Catalyst::Engine::HTTP) does not seem to handle unicode at all. What is worse - it throws exceptions when outputting three byte characters. A very minimal (but complete) test script is attached. Three test cases are PODed out, with notes explaining the behavior. Cheers Peter
#!/usr/bin/perl package cat_test; use warnings; use strict; use Catalyst::Runtime; use Catalyst; use Catalyst::Engine::HTTP; my ($port, $char); =begin this DOES NOT WORK (but does not throw an exception) $ENV{CATALYST_ENGINE} ||= 'HTTP'; $port = 3000; $char = "'\x{F0}'"; =cut =begin this DOES NOT work (exception) $ENV{CATALYST_ENGINE} ||= 'HTTP'; $port = 3000; $char="'\x{F00}'"; =cut =begin this WORKS (tested under apache 2.2) $ENV{CATALYST_ENGINE} ||= 'FastCGI'; $char="'\x{F0}' and even '\x{F00}'"; =cut __PACKAGE__->setup(); __PACKAGE__->run($port); sub default : Private { my ($self, $c) = @_; $c->response->body ("This string contains a wide character: $char"); }
Subject: Re: [rt.cpan.org #32276] Incorrect handling of unicode with the test server
Date: Sun, 13 Jan 2008 15:07:46 -0600
To: bug-Catalyst-Runtime@rt.cpan.org
From: Jonathan Rockway <jon@jrock.us>
Hi, you are seeing the expected behavior. Please read the manual for more details. The short answer is that you need to load Catalyst::Plugin::Unicode if you're using Unicode. Regards, Jonathan Rockway On Sun, 2008-01-13 at 08:06 -0500, Peter Rabbitson via RT wrote:
Show quoted text
> Sun Jan 13 08:06:12 2008: Request 32276 was acted upon. > Transaction: Ticket created by rabbit+bugs@rabbit.us > Queue: Catalyst-Runtime > Subject: Incorrect handling of unicode with the test server > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: rabbit+bugs@rabbit.us > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=32276 > > > > Hi, > > The test server (Catalyst::Engine::HTTP) does not seem to handle unicode at > all. What is worse - it throws exceptions when outputting three byte > characters. A very minimal (but complete) test script is attached. Three test > cases are PODed out, with notes explaining the behavior. > > Cheers > > Peter > > plain text document attachment (catalyst_utf_test) > #!/usr/bin/perl > > package cat_test; > > use warnings; > use strict; > > use Catalyst::Runtime; > use Catalyst; > > use Catalyst::Engine::HTTP; > > my ($port, $char); > =begin this DOES NOT WORK (but does not throw an exception) > $ENV{CATALYST_ENGINE} ||= 'HTTP'; > $port = 3000; > $char = "'\x{F0}'"; > =cut > > =begin this DOES NOT work (exception) > $ENV{CATALYST_ENGINE} ||= 'HTTP'; > $port = 3000; > $char="'\x{F00}'"; > =cut > > =begin this WORKS (tested under apache 2.2) > $ENV{CATALYST_ENGINE} ||= 'FastCGI'; > $char="'\x{F0}' and even '\x{F00}'"; > =cut > > > __PACKAGE__->setup(); > __PACKAGE__->run($port); > > sub default : Private { > my ($self, $c) = @_; > $c->response->body ("This string contains a wide character: $char"); > }

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #32276] Incorrect handling of unicode with the test server
Date: Wed, 16 Jan 2008 10:23:12 +0100
To: bug-Catalyst-Runtime@rt.cpan.org
From: Peter Rabbitson <rabbit+bugs@rabbit.us>
Jonathan Rockway via RT wrote:
Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=32276 > > > Hi, you are seeing the expected behavior. Please read the manual for > more details. The short answer is that you need to load > Catalyst::Plugin::Unicode if you're using Unicode. >
You are correct, this solved my problem although I prefer the approach of Unicode::Encode. However, there is no mention anywhere of unicode or utf8 in the manuals. I downloaded the tarball and did grep -ir - nothing. So it definitely is not in the manual :) This bug can be closed though. Peter
As noted above, this is the expected behavior.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.