[pmwiki-users] Summary my test about xlpage-utf-8.php
songjl at 163.net
Fri Sep 16 05:39:51 CDT 2005
I have read the new xlpage-utf-8.php code but can't understand all, I
could only do a summary to know if my understanding is correct. All the
test below is under win2000 server edition, the php version is
Apache/2.0.44 (Win32) PHP/4.3.1-dev(20020918) with zend(20021010).
pmwiki version is 2.0.5.
For the old xlpage-utf-8.php, I have to set $MakePageNameFunction =
''; because I don't have mbstring extension. Then pmwiki could do the
uppercase convert but drop all non-ASCII chars. For example, if we input
[[édition]], the pagename will be rendered to "Dition". The non-ASCII
char is ignored.
If I set $MakePageNameFunction = 'MakeUTF8PageName'; but del the lines
in MakeUTF8PageName function related to mbstring. Then the non-ASCII
will be output directly, the page Group.[[édition]] could link to
Group.édition, viewing and editing the page works well. However, because
we del mb_strtoupper function, so the ASCII chars won't go uppercase.
For example, Group.[[water]] will be still Group.water.
For the new xlpage-utf-8.php, I use it to overwrite the former one. And
all the things become the same as we set $MakePageNameFunction =
''; [[édition]] become "Dition" and [[water]] become [[Water]]. The
code's comment on the line 53 said: " # convert everything else to
space". So I doubt if we could keep non-ASCII chars no chang (may still
need urlencode), but treat suitable ASCII chars to be uppercase, then we
get a method could treat all UTF-8 page name.
More information about the pmwiki-users