[pmwiki-users] XLPage translations don't work correctly with UTF-8

Petko Yotov 5ko at 5ko.fr
Thu Oct 20 05:48:45 CDT 2011


On Thursday 20 October 2011 11:24:56, Oliver Betz wrote :
> But strings translated by XLPage entries show the black rhomb instead
> of umlauts, e.g. the page actions but also special page names (Recent
> Changes -> Aktuelle ?nderungen).

Interesting find.

Before calling XLPage('de', 'PmWikiDe.XLPage'); in config.php, insert such a 
line:

  include_once("$FarmD/scripts/xlpage-utf-8.php");

There is a catch-22 with the XLPage page: it is first read and then it loads 
the UTF-8 settings for reading a page file; but before the UTF-8 conf is 
loaded, PmWiki thought the encoding was ISO-8859-1, and converted the strings 
from the (utf-8) XLPage to that encoding.

Obviously, since version 2.2.32 the xlpage-utf-8.php file (and the other files 
about older encodings) shouldn't be loaded from XLPage anymore because PmWiki 
tries to convert them to the target encoding (which it doesn't know when first 
reading the page XLPage).

I should think about how to handle this problem and better document it.

Thanks,
Petko



More information about the pmwiki-users mailing list