From 423fae6f18853bfaa08f647e7e4d10b7587738e0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 19 Oct 2008 21:23:48 -0400 Subject: Use the pure perl Data::Dumper when generating setup files to ensure that utf-8 characters are written out as such, and not as the encoded perl strings the C Data::Dumper produces. Note that the text produced by the C version was interpreted fine when ikiwiki loaded the setup file. But it was not user-friendly. --- IkiWiki/Setup/Standard.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'IkiWiki/Setup') diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm index 92f887f0c..e6bff2826 100644 --- a/IkiWiki/Setup/Standard.pm +++ b/IkiWiki/Setup/Standard.pm @@ -26,6 +26,8 @@ sub dumpline ($$$$) { #{{{ local $Data::Dumper::Pad="\t"; local $Data::Dumper::Sortkeys=1; local $Data::Dumper::Quotekeys=0; + # only the perl version preserves utf-8 in output + local $Data::Dumper::Useperl=1; my $dumpedvalue; if (($type eq 'boolean' || $type eq 'integer') && $value=~/^[0-9]+$/) { -- cgit v1.2.3