[pmwiki-users] utf inclusion - odd behavior.

Patrick R. Michaud pmichaud at pobox.com
Tue Feb 13 09:16:11 CST 2007


On Mon, Feb 12, 2007 at 10:57:56PM +0100, Tom Lederer wrote:
> Am 12.02.2007 um 20:44 schrieb Patrick R. Michaud:
> >>>BTW, as of 2.2.0-beta31 the UTF-8 version of AsSpaced is now
> >>>part of the distribution.  (As are the other improvements in that
> >>>recipe. :-)
> >>
> >>...which were a great help for us utf-8 users if it would work ;)
> >>Sorry to tell you that it doesn' t seem to work (at least for me).
> >>
> >Are you sure that celok.de is running 2.2.0-beta29 or later?
> 
> As seen on the pages (below the three vars) i am running 31.
> 
> >It's also possible that the i18n.zip file is overwriting the
> >default xlpage-utf-8.php script with the old one -- I need to
> >fix that next.
> 
> I reinstalled the 31 version which was indeed 0.3 kB larger, that did  
> not work however....
> 
> The problem just gor more confusing... i call the utf-8-fix script  
> (as on the PITS page) at the very bottom of my config. If i call  
> include_once('scripts/xlpage-utf-8.php'); instead (at the very same  
> position) it does not work. If i call that BEFORE the XLPage however  
> it works. I thought that the XLPage would call the file already...

XLPage only calls the xlpage-utf-8.php script if the language page
(e.g., 'PmWikiDe.XLPage') requests a utf-8 encoding via the
'xlpage-i18n' translation.

The German translation distributed in i18n.tgz is in iso-8859-1
('xlpage-i18n' isn't set), thus xlpage-utf-8.php file isn't 
automatically loaded by XLPage().  To get utf-8 in this case
requires explicitly loading the xlpage-utf-8.php script.

It's also a good idea to do any language selection fairly early
in the customization sequence -- before any other recipes are
loaded -- because some encoding and language settings may affect
strings created by other recipes.

> >(Actually, I'm thinking that I will rework the i18n distribution
> >so that each language is available as its own .zip file.)
> 
> That is actually an idea i like very much. Maybe you could even  
> consider to make an english i18n file, so i (and maybe some others)  
> don't have to delete the PmWiki.* files everytime i upgrade...  
> meanwhile all functional parts should reside in Site.* files anyway,  
> IIRC.

Effectively you're suggesting that PmWiki be distributed without
any documentation pages at all...?

Pm



More information about the pmwiki-users mailing list