Support YAML::XS by not passing decoded unicode to Load. Closes: #625713
[ikiwiki.git] / IkiWiki / Setup / Yaml.pm
index 904784728e0a0cbc6314cf26006010b5e5d25d8a..6da93bb644bb5f639dd6871b492782cfa059345d 100644 (file)
@@ -5,6 +5,7 @@ package IkiWiki::Setup::Yaml;
 use warnings;
 use strict;
 use IkiWiki;
+use Encode;
 
 sub loaddump ($$) {
        my $class=shift;
@@ -14,7 +15,7 @@ sub loaddump ($$) {
        eval q{use YAML} if $@;
        die $@ if $@;
        $YAML::Syck::ImplicitUnicode=1;
-       IkiWiki::Setup::merge(Load($content));
+       IkiWiki::Setup::merge(Load(encode_utf8($content)));
 }
 
 sub gendump ($@) {