From: Reini U. <ru...@x-...> - 2006-08-14 11:23:53
|
Reini Urban schrieb: > Mici Maci schrieb: >> thanks for your answer but it's not so easy. PhpWiki >> uses htmlspecialchars() to masq strings, and PhpWiki >> passes a third argument to it containing the charset >> name. htmlspecialchars() does not know about latin2, >> it gives warnings. >> >> lib/XmlElement.php...: 502: Warning: htmlspecialchars(): >> charset `iso-8859-2' not supported, assuming iso-8859-1 >> >> lib/XmlElement.php...: 170: Warning: htmlspecialchars(): >> charset `iso-8859-2' not supported, assuming iso-8859-1 >> >> These two lines (502 and 170) are giving the message >> but lots of times in a page request. What's wrong? May >> I upgrade or reconfigure php to work, or the >> htmlspecialchars() function needs a workaround in >> PhpWiki? >> >> [phpwiki-1.3.12p3] >> [php-4.4.2-1.1] > > Oje! > http://www.mantisbt.org/mantis/bug_view_page.php?bug_id=6624 > > So you have to convert to UTF-8 and bite into the bullet. > Note, that UTF-8 is not officially supported and not included. > > I posted a patch to the sf.net patch area, which should get around most > issues. But since UTF-8 strings are asciiz-safe it is not so harmful to > work without proper UTF-8 support in all string functions. (preg_match, > strlen, ...) BTW: If you do have mbstring loaded in your php it's very easy. Simply set mb_internal_encoding('UTF-8'); somewhere ("lib/config.ini") and set mbstring.func_overload in the php.ini or .htaccess to 7 .htaccess: php_value mbstring.func_overload 7 The hugepatch comes from the fact, that not all servers support mbstring and strlen's are different in UTF-8 land. We do support now, input from UTF-8 land (e.g. MS IE), but convert this input to our charset. -- Reini Urban http://phpwiki.org/ http://murbreak.at/ http://helsinki.at/ http://spacemovie.mur.at/ |