[pmwiki-users] Re: Make xlpage-utf-8.php free from mbstring module?

Elias Soong songjl at 163.net
Fri Sep 16 00:24:07 CDT 2005


     Surely I'd like to help what I could. But perhaps I need your 
telling me on how to do the test. And if there are something related to 
Chinese language, I could help some also.

Patrick R. Michaud wrote:
> On Fri, Sep 16, 2005 at 12:28:06PM +0800, Elias Soong wrote:
> 
>>    If we use utf-8 coding in pmwiki, the xlpage-utf-8.php require the
>>php module mbstring actived. Some host like mine not use mbstring, so we
>>should work aroud it.
>>    I found in the 36th line of xlpage-utf-8.php, could set which
>>PageNameFunction will be used. If I simply set "$MakePageNameFunction =
>>'';", then the xlpage-utf-8.php won't call any mbstring functions, and
>>the pmwiki could work.
>>    My question is, when I set MakePageNameFunction to be none, what is
>>the effect of this? Obviously, WikiWord with non-ASCII will not work. Is
>>there any other side effects?
> 
> 
> Setting $MakePageNameFunction to an empty string causes it to
> use PmWiki's built-in MakePageName function.  The built-in uses
> PHP's strtoupper() function, which doesn't know what to do with
> UTF-8 characters.
> 
> So, if you're willing to live with PmWiki being unable to properly
> uppercase non-ascii first letters of words in pagenames, it's 
> probably okay.  But it means that something like [[édition]] would
> result in an invalid pagename, because (in UTF-8) strtoupper()
> doesn't know how to convert the "é" into an uppercase equivalent.
> 
> I've been thinking about adding a special-purpose UTF-8 capable
> "strtoupper" function to be used in the xlpage-utf-8.php script,
> to be able to avoid the need for the mbstring functions altogether.
> I'll be glad to work on that now if you're willing to help test
> it... :-)
> 
> Pm





More information about the pmwiki-users mailing list