Hello All,

    I am doing some consulting work for a company that is developing a
language translator. During testing, I came across an interesting problem.
While translating data from UTF-8 to iso-8859-6 (Arabic), one of the octets
is not resolving. The problematic octet is <D9><A5>. It should resolve in
8859-6 to <35> but it is not resolving. I was able to successfully resolve
other octets, <D9><85> correctly resolves to <E5>, <D8><B1> correctly
resolves to <D1>, etc. Can anyone explain to me this behavior? Here is the
script that I used (note, I push the results into "less" or "od" so that I
may view the octets):

 

#!/usr/bin/perl 
use Encode; 
$octets=chr(hex("d9")).chr(hex("85")); 
print "$octets\n"; 
Encode::from_to($octets, "utf8", "iso-8859-6"); 
print "$octets\n"; 
exit 0;

 

Thank,

Tal

 

 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to