Hi Tobias
i tried both of it, but still got the same result.

NEXT TRY:
* i saved the controller test.pm in UTF-8 encoding,
* adapted the broken character ...
* called the url
* and it worked!

QUESTION: Catalyst generates Perl files in the computer's standard
encoding (which is cp1252). For *unicode best practice* it should be
in UTF-8 encoded. Do you agree?

Thanks
Stefan

On 9/5/07, Tobias Kremer <[EMAIL PROTECTED]> wrote:
> Quoting Stefan Kühn <[EMAIL PROTECTED]>:
> > * 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',
>     ...
> } );
--

_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Reply via email to