Author |
|
rob Groupie
Joined: 03 September 2008 Location: Canada
Online Status: Offline Posts: 60
|
Posted: 07 November 2008 at 11:46am | IP Logged
|
|
|
Hi guys,
While using IE 7, when i click on the Date column while looking at a list of messages in the inbox to resort by date the following error appears:
Error while parsing XML.
Error code 1.
Response Text:
and in the messages list window it continues to say "Please wait while WebMail is loading messages list" and the list of messages never loads from that point forward. This only occurs on the inbox and not in any other folder such as Sent items or Trash.
If i try the same steps in Firefox, it works fine though.
Could this be something to do with the latest change we made to refresh automatically?
Please help.
Rob
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 10 November 2008 at 2:43am | IP Logged
|
|
|
This issue may occur in case if an email message in your mailbox contains some character which is not acceptable for XML package in Internet Explorer. Mozilla Firefox replaces such characters with "?" symbols automatically.
We've already implemented a workaround for this in 4.3 version. To fix the issue in the current release, find ClearUtf8() function in common/class_convertutils.php file and replace it with:
Code:
/**
* @param string $str
* @return string
*/
function ClearUtf8($str)
{
if (!ConvertUtils::isAscii($str))
{
if (function_exists('iconv'))
{
$str = @iconv('UTF-8', 'UTF-8//IGNORE', $str);
}
else
{
$str = ConvertUtils::ClearUtf8Long($str);
}
}
return ConvertUtils::mainClear($str);
} |
|
|
It's also necessary to define a function below:
Code:
/**
* @param string $str
* @return string
*/
function ClearUtf8Long($str)
{
$matches = array();
$replace = '?';
$UTF8_BAD =
'([\x00-\x7F]'.
'|[\xC2-\xDF][\x80-\xBF]'.
'|\xE0[\xA0-\xBF][\x80-\xBF]'.
'|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}'.
'|\xED[\x80-\x9F][\x80-\xBF]'.
'|\xF0[\x90-\xBF][\x80-\xBF]{2}'.
'|[\xF1-\xF3][\x80-\xBF]{3}'.
'|\xF4[\x80-\x8F][\x80-\xBF]{2}'.
'|(.{1}))';
ob_start();
while (preg_match('/'.$UTF8_BAD.'/S', $str, $matches))
{
echo (!isset($matches[2])) ? $matches[0] : $replace;
$str = substr($str, strlen($matches[0]));
}
$result = ob_get_contents();
ob_end_clean();
return $result;
} |
|
|
Please let us know if this helps you. Thanks!
Regards,
Igor
|
Back to Top |
|
|