Catalyst::View::TT::ForceUTF8 - Template View Class with utf8 encoding
package MyApp::View::TT; use base 'Catalyst::View::TT::ForceUTF8';
Template View Class with utf8 encoding.
This allows you to prevent publishing garbled result.
__PACKAGE__->config( INCLUDE_PATH => [..], TIMER => 0, ... # and other View::TT's configuration. STRICT_CONTENT_TYPE => 1, DEFAULT_ENCODING => 'utf-8', );
'utf-8' is set by default. See more detail Template::Provider::Encoding.
When you set *STRICT_CONTENT_TYPE* configuration, It automatically set content-type 'application/xhtml+xml; charset=utf-8' for browsers except MSIE.
Catalyst::View::TT, Template::Provider::Encoding
Lyo Kato, lyo.kato@gmail.com
lyo.kato@gmail.com
The library if free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Catalyst::View::TT::ForceUTF8, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::View::TT::ForceUTF8
CPAN shell
perl -MCPAN -e shell install Catalyst::View::TT::ForceUTF8
For more information on module installation, please visit the detailed CPAN module installation guide.