[pmwiki-users] ISO 8859-1 conversion patterns for page names

Hans design5 at softflow.co.uk
Tue Nov 20 04:24:07 CST 2007

I tried to add patterns to the $MakePageNamePatterns array,
but failed. Setting $MakePageNamePatterns in config.php resulted in
heaps of errors, and I do not know how to add items or another array
to the $MakePageNamePatterns array. Does it needs to be set with SDVA
in pmwiki.php?

I thought it should be easy to make pagenames for ISO 8859-1 characters
by mapping accented etc characters to their unaccented equivalents,
using a conversion array and adding that to $MakePageNamePatterns.
How can this be done? Has it been done before? This could become a

What is the effect on efficiency adding such a bunch of patterns?
MakePageName is called  a lot.

I include a pattern array for ISO 8859-1 underneath (long for easier
reading! Maybe it needs tweaking. Maybe some characters are missing.)


$ISO-8859-1-ConversionPatterns = array(
        '/Á/' => 'A',
        '/Â/' => 'A',
        '/Ã/' => 'A',
        '/Ä/' => 'Ae',
        '/Å/' => 'Ao',
        '/Æ/' => 'Ae',
        '/Ç/' => 'C',
        '/È/' => 'E',
        '/É/' => 'E',
        '/Ê/' => 'E',
        '/Ë/' => 'E',
        '/Ì/' => 'I',
        '/Í/' => 'I',
        '/Î/' => 'I',
        '/Ï/' => 'I',
        '/Ð/' => 'D',
        '/Ñ/' => 'N',
        '/Ú/' => 'U',
        '/Ó/' => 'O',
        '/Ô/' => 'O',
        '/Õ/' => 'O',
        '/Ö/' => 'Oe',
        '/Ø/' => 'Oe',
        '/Ù/' => 'U',
        '/Ú/' => 'U',
        '/Û/' => 'U',
        '/Ü/' => 'Ue',
        '/Ý/' => 'Y',
        '/Þ/' => 'Th',
        '/ß/' => 'ss',
        '/à/' => 'a',
        '/á/' => 'a',
        '/â/' => 'a',
        '/ã/' => 'a',
        '/ä/' => 'ae',
        '/å/' => 'ao',
        '/æ/' => 'ae',
        '/ç/' => 'c',
        '/è/' => 'e',
        '/é/' => 'e',
        '/ê/' => 'e',
        '/ë/' => 'e',
        '/ì/' => 'i',
        '/í/' => 'i',
        '/î/' => 'i',
        '/ï/' => 'i',
        '/ð/' => 'd',
        '/ñ/' => 'n',
        '/ò/' => 'o',
        '/ó/' => 'o',
        '/ô/' => 'o',
        '/õ/' => 'o',
        '/ö/' => 'oe',
        '/ø/' => 'oe',
        '/ù/' => 'u',
        '/ú/' => 'u',
        '/û/' => 'u',
        '/ü/' => 'ue',
        '/ý/' => 'y',
        '/þ/' => 'th',
        '/ÿ/' => 'y',


More information about the pmwiki-users mailing list