[pmwiki-users] Can't save some Chinese wiki word page.

Elias Soong songjl at 163.net
Wed Sep 28 11:56:57 CDT 2005


A man named henry on the Chinese page of www.pmwiki.org said, if a page
named as some special Chinese word, this page will not be save.

I have tested it. If name a page as %e7%ba%a2 (the UTF-8 value of a
Chinese page name), and when click the submit, then server say:

----

Warning: fopen(wiki.d/Main.红,new) [function.fopen]: failed to create
stream: Invalid argument in D:\www\pmwiki2\pmwiki.php on line 578

PmWiki can't process your request
Cannot write page to Main.红 (wiki.d/Main.红)...changes not saved

We are sorry for any inconvenience.

----

This only happen on PHP at windows platform, and may only for Chinese
windows platform. On linux, all Chinese word is ok. So we think it is a
bug for PHP.

A work a round is, at the line 578, 590 and 592, change "$pagename,new"
to be "$pagename"."_new", all words will be ok. If we change it to be
"$pagename".",new" or "$pagename".".new", it still the same problem.

Maybe we should change the temporary file naming method for this
problem. Thanks a lot.





More information about the pmwiki-users mailing list