Friday, 6 September 2013

why unicode of arabic and persian chars are the same?

why unicode of arabic and persian chars are the same?

i wrote this code in my php
echo ord("Ê").' - '.ord("Ê")."<br />";
echo ord("æ").' - '.ord("æ")."<br />";
echo ord("ß").' - '.ord("˜")."<br />";
echo ord("Ö").' - '.ord("Ö")."<br />";
echo ord("í").' - '.ord("&#1740;")."<br />";
echo ord("Í").' - '.ord("Í")."<br />";
echo ord("ã").' - '.ord("ã")."<br />";
echo ord("ä").' - '.ord("ä")."<br />";
echo ord("Ç").' - '.ord("Ç")."<br />";
echo ord("Ã").' - '.ord("Â")."<br />";
echo ord("Ë").' - '.ord("Ë")."<br />";
echo ord("Ú").' - '.ord("Ú")."<br />";
echo ord("È").' - '.ord("È")."<br />";
the first are arabic chars and teh second one are persian but the result
of the code is:
216 - 216
217 - 217
217 - 218
216 - 216
217 - 219
216 - 216
217 - 217
217 - 217
216 - 216
216 - 216
216 - 216
216 - 216
216 - 216
this show a lot of chars have the same ASCII code i have to detect the
language from ascii code but it seems this is not possible!!

No comments:

Post a Comment