[Catalyst] TT and UNICODE: Garbled special characters

Stefan Kühn ducdebreme at early-dance.de
Fri Sep 7 15:17:02 GMT 2007


Thanks to all of you for Your postings. I have continued to investigate.
I found, that TT is not the reason. I can reproduce the problem in 4
simple steps just by using Catalyst.

1. Create a Catalyst application
   catalyst.pl CatSimple

2. cd CatSimple

3. Create a Controller
   script\catsimple_create.pl controller Utf8

4. in the Controller::Utf8 replace the subroutine with the following code
====
sub index : Private {
	my ( $self, $c ) = @_;

	# a very basic HTML-File that contains German Umlaute
	$c->response->body(
qq{<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>test</title>
</head>
<body>
   GERMAN UMLAUT HERE: ___\xFC\xFC\xFC___
</body>
</html>    	
    	}
	);
}
====

RESULT
After starting the server and accessing the url, i got again question
marks instead of the german umlaute, like:

   GERMAN UMLAUT HERE: ___???___

FUNNY NOTE: when i switch the browser's character encoding to Western
(FF2 : View > character encoding > iso-8859-1), the german Umlauts are
shown correctly.
Behaviour is the same, when using C::P::Unicode.

After all, that i have heard, Catalyst should be able to deal with
this simple case.

Any ideas? A possible C::P::Unicode bug?
Thanks
Stefan



More information about the Catalyst mailing list