Template-Provider-Encoding
view release on metacpan or search on metacpan
- Added dependency for Template-Toolkit
(Thanks to Andreas Koenig)
0.06 Sun Oct 22 21:11:38 JST 2006
- Skip obj.t test if Template::Stash::XS is not available
0.05 2006-02-05T01:10:24Z
- Packaging bug caused test errors
0.04 2006-01-26T18:50:22Z
- Do nothing when template is BOMed
(Thanks to Bill Moseley)
0.03 2006-01-16T22:38:37Z
- Use $Template::Stash::Config as a base class to support
XS based object variable correctly
0.02 Sat Jan 14 15:01:49 UTC 2006
- Added Template::Stash::ForceUTF8 and now this module works magically
(you can mix Unicode flagged and UTF-8 bytes in stash!)
- Now no_unicode mode is unnecessary since we have magical stash
lib/Template/Provider/Encoding.pm view on Meta::CPAN
Template::Provider::Encoding is a Template Provider subclass to decode
template using its declaration. You have to declare encoding of the
template in the head (1st line) of template using (fake) encoding TT
plugin. Otherwise the template is handled as utf-8.
[% USE encoding 'utf-8' %]
Here comes utf-8 strings with [% variable %].
=head1 DIFFERNCE WITH OTHER WAYS
=head2 UNICODE option and BOM
Recent TT allows C<UNICODE> option to Template::Provider and by adding
it Provider scans BOM (byte-order mark) to detect UTF-8/UTF-16 encoded
template files. This module does basically the same thing in a
different way, but IMHO adding BOM to template files is a little
painful especially for non-programmers.
=head2 Template::Provider::Encode
L<Template::Provider::Encode> provides a very similar way to detect
Template file encodings and output the template into various
encodings.
This module doesn't touch output encoding of the template and instead
it emits valid Unicode flagged string. I think the output encoding
( run in 0.689 second using v1.01-cache-2.11-cpan-131fc08a04b )