Catalyst-View-TT

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    showing this.

  Unicode (pre Catalyst v5.90080)
    NOTE Starting with Catalyst v5.90080 unicode and encoding has been baked
    into core, and the default encoding is UTF-8. The following advice is
    for older versions of Catalyst.

    Be sure to set "ENCODING => 'utf-8'" and use
    Catalyst::Plugin::Unicode::Encoding if you want to use non-ascii
    characters (encoded as utf-8) in your templates. This is only needed if
    you actually have UTF8 literals in your templates and the BOM is not
    properly set. Setting encoding here does not magically encode your
    template output. If you are using this version of Catalyst you need to
    all the Unicode plugin, or upgrade (preferred)

  Unicode (Catalyst v5.90080+)
    This version of Catalyst will automatically encode your body output to
    UTF8. This means if your variables contain multibyte characters you
    don't need top do anything else to get UTF8 output. However if your
    templates contain UTF8 literals (like, multibyte characters actually in
    the template text), then you do need to either set the BOM mark on the
    template file or instruct TT to decode the templates at load time via
    the ENCODING configuration setting. Most of the time you can just do:

        MyApp::View::HTML->config(
            ENCODING => 'UTF-8');

    and that will just take care of everything. This configuration setting
    will force Template to decode all files correctly, so that when you hit
    the finalize_encoding step we can properly encode the body as UTF8. If
    you fail to do this you will get double encoding issues in your output

lib/Catalyst/View/TT.pm  view on Meta::CPAN


=head2 Unicode (pre Catalyst v5.90080)

B<NOTE> Starting with L<Catalyst> v5.90080 unicode and encoding has been
baked into core, and the default encoding is UTF-8.  The following advice
is for older versions of L<Catalyst>.

Be sure to set C<< ENCODING => 'utf-8' >> and use
L<Catalyst::Plugin::Unicode::Encoding> if you want to use non-ascii
characters (encoded as utf-8) in your templates.  This is only needed if
you actually have UTF8 literals in your templates and the BOM is not
properly set.  Setting encoding here does not magically encode your
template output.  If you are using this version of L<Catalyst> you need
to all the Unicode plugin, or upgrade (preferred)

=head2 Unicode (Catalyst v5.90080+)

This version of L<Catalyst> will automatically encode your body output
to UTF8. This means if your variables contain multibyte characters you don't
need top do anything else to get UTF8 output.  B<However> if your templates
contain UTF8 literals (like, multibyte characters actually in the template
text), then you do need to either set the BOM mark on the template file or
instruct TT to decode the templates at load time via the ENCODING configuration
setting.  Most of the time you can just do:

    MyApp::View::HTML->config(
        ENCODING => 'UTF-8');

and that will just take care of everything.  This configuration setting will
force L<Template> to decode all files correctly, so that when you hit
the finalize_encoding step we can properly encode the body as UTF8.  If you
fail to do this you will get double encoding issues in your output (but again,



( run in 0.310 second using v1.01-cache-2.11-cpan-f29a10751f0 )