|
-
hi..
Here's a code i found in PHP.net for converting German letters ... Luckly, it works for my Arabic data ..
[PHP]
function convert_text($str)
{
$out = '';
for ($i = 0; $i<strlen($str);$i++)
{
$ch = ord($str{$i});
switch($ch)
{
case 252: $out .= chr(129); break; //u Umlaut
case 220: $out .= chr(154); break;//U Umlaut
case 228: $out .= chr(132); break;//a Umlaut
case 196: $out .= chr(142); break;//A Umlaut
case 214: $out .= chr(153); break;//O Umlaut
case 246: $out .= chr(148); break;//o Umlaug
case 223: $out .= chr(225); break;//SZ
case 228: $out .= chr(224); break;
default :{ $out .= chr($ch);}
}
}
return $out;
}
[/PHP]
but I still have a problem even when using this cool function, which is converting arabic data coming from Excel file into readable data using the browser .. ( where the datat came from excel is displayed as '?' in the browser )
Any idea?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|