It looks like you got it worked out to where you understand the issues but it sounds like an XY problem. Is this just a learning exercise or do you have some kind of requirements? Here is a simplistic, related tangent that arrives at the same hex values–
#!/usr/bin/env perl use utf8; use strict; use warnings; use HTML::Entities "encode_entities"; my $arabic = "ﻟﻠﺒﻴﻊ"; # "For sale" print encode_entities($arabic), $/; __END__ ﻟﻠﺒﻴﻊ
In reply to Re: Arabic to Hex and Hex to Arabic
by Your Mother
in thread Arabic to Hex and Hex to Arabic
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |