On Tue, 25 Mar 2008 17:25:34 +0300
Nikolay Shaplov <[EMAIL PROTECTED]> wrote:

Many thank to everyone, who answered...

May I offer a FAQ.tt patch, with your answers inside, so other users do
not have to ask same questions? 

This patch should be applied to
svn://svn.tt2.org/Template2/trunk/docsrc/src/FAQ/FAQ.tt2 
(if accepted ;-) )
--- FAQ.tt2.etalon	2008-03-25 19:00:51.000000000 +0300
+++ FAQ.tt2	2008-03-25 19:18:25.000000000 +0300
@@ -315,3 +315,15 @@
 This illustrates the basic principal but you can extend it to perform
 pretty much any kind of per-document initialisation that you require.
 
+=head1 Unicode issues
+
+=head2 Why do I get rubbish for my utf-8 templates?
+
+First of all, make sure that your template file have 
+L<BOM|http://en.wikipedia.org/wiki/Byte_Order_Mark>.
+
+If you for some reason don't want to add BOM to your templates, you may
+force Template to use utf-8 encoding for your templates:
+
+ my $template = Template->new({ ENCODING => 'UTF-8' });
+
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to