[pmwiki-users] PmWiki.org UTF-8 migration complete

Oliver Betz list_ob at gmx.net
Mon Oct 31 03:14:23 CDT 2011


Petko Yotov wrote:

>On Sunday 30 October 2011 22:00:00, Oliver Betz wrote :
>> If I put the "XLPage('de','PmWikiDe.XLPage');" before the
>> "include_once("$FarmD/scripts/xlpage-utf-8.php");", I get the correct
>> rendering of all pages, but of course the wrong XLPage translations...
>
>Is the include_once line after XLPage or is it disabled? If both lines are 
>active, the only difference should be the (in)correct decoding of the strings 
>in PmWikiDe.XLPage. Other pages should be unaffected.

there is no difference between "xlpage-utf-8.php after XLPage()" and
"xlpage-utf-8.php disabled", both result in correct display for old
and new pages but wrong XLPage translations.

Seemingly that's because PmWikiDe.XLPage causes xlpage-utf-8.php to be
included, correct?

With

 include_once("$FarmD/scripts/xlpage-utf-8.php");
 XLPage('de','PmWikiDe.XLPage');

I get correct results for XLPage translations but wrong results for
"old" pages without charset definition.

Next step: After removing the 'xlpage-i18n' => 'utf-8' entry from
PmWikiDe.XLPage, I get different results:

"xlpage-utf-8.php after XLPage()" results in wrong display of old
pages. and "xlpage-utf-8.php disabled" results in corect display.

Well, that's somewhat surprising. Can it be true that removing UTF-8
entries completely fixes the display problems? Even if this is true,
it's no solution, because new pages are stored as ISO-8859-1 instead
of UTF-8.


Next step (suggestion from your other mail):
 $DefaultPageCharset = array(''=>'ISO-8859-1');
 include_once("$FarmD/scripts/xlpage-utf-8.php");
 XLPage('de','PmWikiDe.XLPage');

seems to cure the problem: New pages are UTF-8, pages without
declaration and XLPage translations are dispalyed correctly, and it
doesn't matter whather PmWikiDe.XLPage contains "'xlpage-i18n' =>
'utf-8'" or not. 

The position of the $DefaultPageCharset doesn't seem to be critical,
but xlpage-utf-8.php must be included before the XLPage() call.

Gladly I have neither other encodings nor page names with
international characters.

Thanks for the solution!

Is $DefaultPageCharset = array(''=>'ISO-8859-1'); only used to guess
the charset of pages not containing a definition, or are there other
effects?

Oliver
-- 
Oliver Betz, Muenchen (oliverbetz.de)




More information about the pmwiki-users mailing list