Recent Topics

1 Jul 24, 2006 10:02    

Hi

When I display my arabic blog in IE, I get the folowing:

http://www.alkhater.net/ablog/temp/IE.gif

But When I display the same in fireFox I get:

http://www.alkhater.net/ablog/temp/Firefox.gif

I can't see where the problem is? appreciate all the help.[/img]

2 Jul 24, 2006 10:11

The problem with IE is that the semi-colon is missing after each of the char codes.

¥

3 Jul 24, 2006 16:31

Thanks for your prompt reply, but it is only the date and it would be a big job to go through all the post and insert semi-colons

I remember writing a function to translate the date but I forgot which file has that function.

Do you know where the date is inserted in the post?

4 Jul 24, 2006 19:11

Thanks Bkueeye:

I found the function which was:


function arabicNumbers ($str) {
	$return = '';
	for($i = 0; $i < strlen($str); $i++) {
		$number = substr($str, $i, 1);
		if (bin2hex($number) > 29 && bin2hex($number) < 40) {
			$number = bin2hex($number) + 630;
			$return .= '&#x'.$number;
		} else {
			$number = bin2hex($number);
			$return .= '&#x'.$number;
		}
	}
	return $return;
}
?>

And changed it to (adding semi-colon):

function arabicNumbers ($str) {
	$return = '';
	for($i = 0; $i < strlen($str); $i++) {
		$number = substr($str, $i, 1);
		if (bin2hex($number) > 29 && bin2hex($number) < 40) {
			$number = bin2hex($number) + 630;
			$return .= '&#x'.$number .';';
		} else {
			$number = bin2hex($number);
			$return .= '&#x'.$number .';';
		}
	}
	return $return;
}
?>

Thanks for you hint.


Form is loading...