Unicode fixes
Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 [Tue, 6 Apr 2010 12:08:59 +0000 (14:08 +0200)]
lib/Moose/Website.pm

index bdaa817..e5591fa 100644 (file)
@@ -103,7 +103,9 @@ has 'template_config' => (
     is      => 'ro',
     isa     => 'HashRef',
     lazy    => 1,
-    default => sub { +{} },
+    default => sub { +{
+        ENCODING => 'UTF-8',
+    } },
 );
 
 sub log { shift; warn @_, "\n" }
@@ -120,7 +122,8 @@ sub run {
         $self->tt->process(
             $page->{template},
             $self->build_template_params( current_page => $page ),
-            $outfile
+            $outfile,
+            { binmode => ':encoding(UTF-8)' },
         ) || confess $self->tt->error;
     }