[pmwiki-users] problem with page title and file name, under utf-8

nikos 231036448 at freemail.gr
Mon Apr 20 17:38:50 CDT 2009


Στις Wednesday 15 April 2009 02:28:17 γράψατε:
> On Tuesday 14 April 2009 23:00:05 nikos wrote:
> > I have a problem with page titles,
> > and possibly with file names,
> > under utf-8.
> >
> > While the content text looks ok,
> > the non-English titles are not readable.
>
> The problem with the titles in the skin is using the function strtolower()
> in abitmodern.php. Strtolower() is not compatible with multibyte UTF-8.
>
> You should either remove it, or, if you require lowercase titles, replace
> it with PmWiki's $StrFoldFunction (version 2.2.0 stable or newer) in the
> file pub/skins/abitmodern/abitmodern.php:
>
>   # remove
>   $GLOBALS['title'] = FmtPageName('$WikiTitle', $pagename);
>   $GLOBALS['currentpage'] = FmtPageName('$Namespaced', $pagename);

I tried this, and it works fine now...

>
>   # or, use $StrFoldFunction :
>   global $StrFoldFunction;
>   $GLOBALS['currentpage'] =
>      $StrFoldFunction(FmtPageName('$Namespaced', $pagename));
>   $GLOBALS['title'] = $StrFoldFunction(FmtPageName('$WikiTitle',
> $pagename));
>


> > In the ftp manager (Konqueror),
> > as well as in the web based file manager,
> > the non-English file names,
> > are  unreadable.
>
> This happens if the filesystem of the hosting server is mounted with a
> different encoding, like Latin1 instead of UTF-8. While this is certainly
> annoying, PmWiki should be able to search, list and find its own pages.
>
> In Konqueror, there is the command in the menus:
>   Tools > Select Remote Charset > Unicode (utf8)
>
> Then reload the folder (F5).

Yeap, that was it...


>
>
> There is also a recommended order when you include UTF-8 in config.php:
> 1. First (optional), some PageStore class like PerPageDirectories, SQLite,
> CompressedPageStore. You don't have to use one of those, but if you do, it
> is better to include it before any other recipes.
>
> 2. Second, before you include any other recipes :
>   include_once("$FarmD/scripts/xlpage-utf-8.php"); # -OR/AND-
>   XLPage("PmWikiGr.XLPage"); # if you have such line
>
> 3. Any other recipes, AuthUser, PmForm, etc.

I had already done this.

> Hope that helps.
>
> Thanks,
> Petko

Thanks once again Petko
Nikos



More information about the pmwiki-users mailing list