Hi,

I have a problem with using UFT8-encoded templates.
The problem seems to be caused by the templates not being open'd() with the :utf8 flag.


I can use these templates with HTML::Template just fine, unless I put in template parameters that are Unicode strings.

As long as there are no parameters in the template, or the parameters are pure ASCII, Perl does not set the utf8 flag to the output string.
This means that string just contains the original bytes, and encoding is not an issue.
But once I put Unicode strings into the template, the template output string get upgraded to utf8, with the effect that the bytes in the template
(already UTF-8, but that is not known to Perl) are encoded again, which breaks everything.


I was able to hot-fix this by including "use open ':utf8';" at the top of the HTML::Template source file.

Is there a better way?

I am running Perl 5.8.4 (built without any custom settings) on RedHat Enterprise Linux 3.



Thanks,

Thilo



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to