Quoting Stefan Kühn <[EMAIL PROTECTED]>:
> I have a problem when outputting special characters with
> Template-Toolkit and C::P::Unicode. I passed a simple template
> parameter from the controller to the view. The parameter contains a
> special character and is being garbled in the output.
> * In controller test.pm > added the following (note the German Umlaut)
> sub index : Private {
>     my ( $self, $c ) = @_;
>         $c->stash->{myname} = 'düc'; # <-- **NOTE** the German Umlaut
>         $c->stash->{template} = 'test.tt2';
> }

If you use special characters as string literals you have to "use utf8" at the
top of your controller.

Other than that you should tell TT that your templates are UTF-8 encoded by
passing it a configuration option in your View class:

__PACKAGE__->config( {
    ...
    ENCODING            => 'utf-8',
    ...
} );

HTH,

--Tobias

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to