From: <var...@us...> - 2017-03-13 16:10:15
|
Revision: 10004 http://sourceforge.net/p/phpwiki/code/10004 Author: vargenau Date: 2017-03-13 16:10:12 +0000 (Mon, 13 Mar 2017) Log Message: ----------- Importing a ZIP from an old wiki in Latin 1 (ISO 8859-1) failed. Reported by Frank Michael. Modified Paths: -------------- trunk/lib/mimelib.php trunk/pgsrc/ReleaseNotes Modified: trunk/lib/mimelib.php =================================================================== --- trunk/lib/mimelib.php 2017-01-18 15:49:41 UTC (rev 10003) +++ trunk/lib/mimelib.php 2017-03-13 16:10:12 UTC (rev 10004) @@ -58,7 +58,12 @@ { // Eliminate soft line-breaks. $string = preg_replace('/=[ \t\r]*\n/', '', $string); - return quoted_printable_decode($string); + $decoded = quoted_printable_decode($string); + // When importing e.g. a ZIP from an old wiki in Latin 1 (ISO 8859-1) + if (!is_utf8($decoded)) { + $decoded = utf8_encode($decoded); + } + return $decoded; } define('MIME_TOKEN_REGEXP', "[-!#-'*+.0-9A-Z^-~]+"); Modified: trunk/pgsrc/ReleaseNotes =================================================================== --- trunk/pgsrc/ReleaseNotes 2017-01-18 15:49:41 UTC (rev 10003) +++ trunk/pgsrc/ReleaseNotes 2017-03-13 16:10:12 UTC (rev 10004) @@ -1,4 +1,4 @@ -Date: Wed, 14 Dec 2016 18:55:50 +0000 +Date: Mon, 13 Mar 2017 15:59:30 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.6.0) Content-Type: application/x-phpwiki; pagename=ReleaseNotes; @@ -30,6 +30,7 @@ ** Make XHTML ZIP Snapshot work again (broken since ~PhpWiki 1.5.3) ** It was possible to rename a page to a name with illegal characters, like ~[~] ** Remove wrong calls to setTightness in ##lib/~InlineParser.php## (bug reported by Harold Hallikainen) +** Importing a ZIP from an old wiki in Latin 1 (ISO 8859-1) failed. Reported by Frank Michael. * Plugins: ** ~UpLoad plugin: put date and author in history ** ~UpLoad plugin: don't inline images This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |