Bugs item #1927706, was opened at 2008-03-27 20:47
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1927706&group_id=191583
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Vacation
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Master Merlin Kull Kirkpatrick (thefathermind)
Assigned to: Nobody/Anonymous (nobody)
Summary: cannot yet handle MBCS in html_entity_decode
Initial Comment:
In the vacation module I got this error about 200 times..
"cannot yet handle MBCS in html_entity_decode"
This is a documented bug in the 4.3 versions of PHP that they say they are not going to resolve stated here...
http://bugs.php.net/bug.php?id=25670
I implemented the following work around to resolve this...
in common.php I added the following 2 functions...
// Returns the utf string corresponding to the unicode value (from php.net, courtesy - ro...@vo...)
function code2utf($num)
{
if ($num < 128) return chr($num);
if ($num < 2048) return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
if ($num < 65536) return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
if ($num < 2097152) return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
return '';
}
function html_entity_decode_fixed($str)
{
return preg_replace('/&#(\\d+);/e', 'code2utf($1)', utf8_encode($str));
}
Then I edited edit-vacation.php and users/vacation.php and replaced all "html_entity_decode" with "html_entity_decode_fixed"
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1927706&group_id=191583
|