]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Use the pure perl Data::Dumper when generating setup files to ensure that utf-8 chara...
authorJoey Hess <joey@kodama.kitenet.net>
Mon, 20 Oct 2008 01:23:48 +0000 (21:23 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Mon, 20 Oct 2008 01:23:48 +0000 (21:23 -0400)
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
debian/changelog
doc/bugs/unicode_chars_in_wikiname_break_auth.mdwn

index 92f887f0c4c1b565f1949b963e40da94e88c08be..e6bff2826ff73497385d1dbd332c2bb842fc110d 100644 (file)
@@ -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]+$/) {
index 352329f94b8d7110410d8a580e88676190e89a8e..e5379930686dad8c26557b15cf7937ab9984de73 100644 (file)
@@ -14,6 +14,9 @@ ikiwiki (2.68) UNRELEASED; urgency=low
     formatted time.
   * Fix issue with utf-8 in wikiname breaking session cookies, by
     entity-encoding the wikiname in the session cookie.
+  * 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.
 
  -- Joey Hess <joeyh@debian.org>  Fri, 17 Oct 2008 20:11:02 -0400
 
index 7c71ff0ff2b985f35b2caaaba14f42d7fb7a6819..5d5e90f7a9e0f5eadda1459c4811448171bd7f5f 100644 (file)
@@ -9,6 +9,8 @@ Replacing "ยท" with "-" in `wikiname` fixed this login issue.
 > the wikiname. But it doesn't seem to work, somehow the encoded utf-8
 > value still doesn't make it through. (CGI::Session seems to have underermined utf-8
 > issues too.) Seems like I will have to possibly break some sessions and
-> entity-encode the wikiname in the cookie.. done. --[[Joey]]
+> entity-encode the wikiname in the cookie.. [[done]]. --[[Joey]]
 
 (BTW, such a char was replaced by -I don't remember what encoding thingie- in my setup file, when running `ikiwiki-transition setupformat`.)
+
+> Thanks for the heads up, fixed that too. --[[Joey]]