PHP config/Iconv hack

<- MediaWiki architecture < PHP config

MediaWiki uses iconv to convert data between character sets. For most configurations, this is done mainly for conversion of URLs to and from UTF-8.

If you can't recompile PHP with iconv support and you only expect to deal with Latin-1 data, you can probably get away with defining this hackish substitute:

function iconv($from,$to,$text) {
    if(strcasecmp($from,$to) == 0) return $text;
    if(strcasecmp($from,"utf-8") == 0) return utf8_decode($text);
    if(strcasecmp($to,"utf-8") == 0) return utf8_encode($text);
    return $text;
}