[Templates] Plugins and Unicode confusion
Tatsuhiko Miyagawa
miyagawa@gmail.com
Thu, 16 Feb 2006 13:36:57 -0800
On 2/16/06, Bernhard Graf <tt@augensalat.de> wrote:
> Still no joy (and a warning):
> perl \
> -MTemplate::Stash::ForceUTF8 \
> -MTemplate::Provider::Encoding \
> -MTemplate -e \
> 'Template->new({
> LOAD_TEMPLATES =3D> [ Template::Provider::Encoding->new],
> STASH =3D> Template::Stash::ForceUTF8->new
> })->process("tt.tt")'
> Wide character in print
> at /usr/lib/perl5/vendor_perl/5.8.5/i586-linux-thread-multi/Template.pm
> line 168.
> N=E4chster Monat: M?z
That's because Date plugin returns the string in latin-1, which is not
"the right thing to do". It should be either UTF-8 bytes or Unicode
string when you want to use Plugin::Encoding.
--
Tatsuhiko Miyagawa