00317: using utf-8 causes "Fatal Error"

Summary: using utf-8 causes "Fatal Error"
Created: 2005-02-03 05:08
Status: Suspended
Category: Bug
From: tyndal?
Priority: 5
Version: 2.0.beta20
OS: Windows XP (jp), Apache/2.0.49, PHP Version 4.3.7


I tried to use UTF-8 with pmwiki, using the suggestion in the FAQ to

A: A: Download the internationalizations code, then add the line include_once('scripts/xlpage-utf-8.php') to your local/config.php. This enables utf-8 on the site.

This causes an error on all pages of my wiki, the error is:

Fatal error: Call to undefined function: mb_strtoupper() in F:\programs\apache\Apache2\htdocs\pmwiki2\scripts\xlpage-utf-8.php(60) : regexp code on line 1

Im thinking its due to the fact that I am using apache on Windows XP and/or the fact that the OS is Japanese..

I marked this as high priority because it is essentially a "crash".. though obviously i can get around it by not enabling UTF8.

I got the the same error message (the path in the error message is differnt, according to my installation).

Version: 2.0.beta22
OS: Linux 2.4.21, Apache/1.3.26, PHP Version 4.2.2

So it seems not to be a problem of Japanese windows, as my system language is German.

regards, Herbert

I got the chance to test UTF-8-enabling on another platform:

Version: 2.0.beta23
OS: Win2000, Apache/2.0.48 (Win32) PHP/4.3.4

... and got: Fatal error: Call to undefined function: mb_strtoupper() in C:\apache\htdocs\pmwiki\scripts\xlpage-utf-8.php(60) : regexp code on line 1

After changing the config.php back, PmWiki is running wonderful again.

Sorry to bother you, but I would like it so much to use this nice software (Thanks for all the work done!!) in both German and Greek.

Bye, Herbert

The function mb_strtoupper() should be with PHP>=4.3.0 to make a string uppercase according to the manual. There's also the following sample to test the function (save it to test.php anywhere on your webserver and call it from your browser).

$str = "Mary Had A Little Lamb and She LOVED It So";
$str = mb_strtoupper($str);

And yes, I'm getting the mentioned error on both of my machines with that little test. So far I got it. That means the function is not available. I learn that to have it available PHP has to be compiled with mbstring support enabled (that is on both of my machines) and the php.ini has to be set propperly - and here's the problem, cause it isn't. On my test machines I could do that now, but on the settings of my provider I don't have that opportunity. So does that mean, no way of using UTF-8 then? Or could there be a way with limitting the Wikiwords to ASCII only?

Thanks, Herbert