I installed the 1.5.0 RC4 version with mySQL on Fedora Core3.
There was a problem in a Japanese(UTF-8 ) FAQ input.
The inputted string was not displayed normally. As a result of investigating, the call of php function:'htmlentities' in 'inc/function.php' was solved by changing as follows.
htmlentities($row->thema,ENT_NOQUOTES,$PMF_LANG["metaCharset"]);
Probably, in case a multi-byte character is treated, I think that the 3rd argument needs to be specified.
htmlentities problem
Moderator: Thorsten
Hi,
thanks for testing. It's fixed in CVS.
bye
Thorsten
thanks for testing. It's fixed in CVS.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
htmlentities()
Hi ,
I using phpMyFAQ1.5.0 Czech version windows-1250 and I recevieng this
Warning: htmlentities(): charset `windows-1250' not supported, assuming iso-8859-1 in /home/www/htdocs/faq15/inc/functions.php on line 111
Can you help me ?
Thanks
I using phpMyFAQ1.5.0 Czech version windows-1250 and I recevieng this
Warning: htmlentities(): charset `windows-1250' not supported, assuming iso-8859-1 in /home/www/htdocs/faq15/inc/functions.php on line 111
Can you help me ?
Thanks
Last edited by onimalu on Thu Sep 01, 2005 9:44 am, edited 1 time in total.
Hi,
I'll work on a fix for that.
bye
Thorsten
I'll work on a fix for that.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
please try this fix in inc/functions.php. PLease change the function getThema():
bye
Thorsten
please try this fix in inc/functions.php. PLease change the function getThema():
Code: Select all
function getThema($id, $lang)
{
global $db, $PMF_LANG;
$acceptedCharsets = array('iso-8859-1', 'iso-8859-15', 'utf-8', 'cp866', 'ibm866', '866', 'cp1251', 'windows-1251', 'win-1251', '1251', 'cp1252', 'windows-1252', '1252', 'KOI8-R', 'koi8-ru', 'koi8r', 'BIG5', '950', 'GB2312', '936', 'BIG5-HKSCS', 'Shift_JIS', 'SJIS', '932', 'EUC-JP', 'EUCJP');
$result = $db->query(sprintf("SELECT thema FROM %sfaqdata WHERE id = %d AND lang = '%s'", SQLPREFIX, $id, $lang));
if ($db->num_rows($result) > 0) {
while ($row = $db->fetch_object($result)) {
if (in_array($PMF_LANG["metaCharset"], $acceptedCharsets)) {
$output = htmlentities($row->thema, ENT_NOQUOTES, $PMF_LANG['metaCharset']);
} else {
$output = htmlentities($row->thema);
}
}
} else {
$output = $PMF_LANG["no_cats"];
}
return $output;
}
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist