* Improve workaround for perl bug #376329. Rather than double-encoding,
authorJoey Hess <joey@kitenet.net>
Tue, 27 Nov 2007 21:36:37 +0000 (16:36 -0500)
committerJoey Hess <joey@kitenet.net>
Tue, 27 Nov 2007 21:36:37 +0000 (16:36 -0500)
  which has been reported to cause encoding problems (though I haven't
  reproduced them), just catch a failure of markdown, and retry.
  (The crazy perl bug magically disappears on the retry.)
Closes: #449379
IkiWiki/Plugin/mdwn.pm
debian/changelog
po/ikiwiki.pot

index ca8898679216684da988bfd2fb08cd14dd04ff51..254ab51d03b078afbbeed1727fdb56b18a6c1a1c 100644 (file)
@@ -43,9 +43,11 @@ sub htmlize (@) { #{{{
        
        # Workaround for perl bug (#376329)
        $content=Encode::encode_utf8($content);
-       $content=Encode::encode_utf8($content);
-       $content=&$markdown_sub($content);
-       $content=Encode::decode_utf8($content);
+       eval {$content=&$markdown_sub($content)};
+       if ($@) {
+               eval {$content=&$markdown_sub($content)};
+               print STDERR $@ if $@;
+       }
        $content=Encode::decode_utf8($content);
 
        return $content;
index 2a9aae3ab6f4e99d8070adcc6217e59259877ac9..fe93e036c1e06af5a5264f8e0a82993c4de0b6ea 100644 (file)
@@ -5,6 +5,11 @@ ikiwiki (2.15) UNRELEASED; urgency=low
     the setup process much simpler.
   * Reorganised git documentation.
   * Actually install the ikiwiki-update-wikilist program.
+  * Improve workaround for perl bug #376329. Rather than double-encoding,
+    which has been reported to cause encoding problems (though I haven't
+    reproduced them), just catch a failure of markdown, and retry.
+    (The crazy perl bug magically disappears on the retry.)
+    Closes: #449379
 
  -- Joey Hess <joeyh@debian.org>  Tue, 27 Nov 2007 00:16:40 -0500
 
index 9dd020f8c974d7c4d1348123b4cbb5a8d0cfdf78..277df7f21ffa51131b5f2ead0f83784da42a8438 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-11-26 15:27-0500\n"
+"POT-Creation-Date: 2007-11-27 16:32-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"