[Templates] Plugins and Unicode confusion
Bernhard Graf
tt@augensalat.de
Thu, 16 Feb 2006 20:11:06 +0100
Hi,
I have templates (and code) in UTF-8 encoded files.
Everything works fine until a plugin or an object expands non-ascii=20
strings into the template file: They are written as latin1!
Here is an example:
Template file called "tt.tt" in current directory (UTF-8 encoded):
[% USE date(locale =3D 'de_DE', format =3D '%B') -%]
N=E4chster Monat: [% date.format('00:00:00 01-03-2006') %]
perl -MTemplate -e 'Template->new->process("tt.tt")'
N=E4chster Monat: M?z
=2E.. where "?" is a funny (dep. on font) useless character.
The date plugin calls POSIX::strftime().
Output is ok when I call POSIX::strftime() directly:
perl -MPOSIX -e 'print POSIX::strftime("%B",0,0,0,1,2,106), "\n";'
M=E4rz
Any suggestions?
=2D-=20
Bernhard Graf