Let's assume you need to convert Eastern Arabic to Western.
Look for example, at this table:
http://persian.nmelrc.org/persianword/numbers.htm[
^].
You can see that the code points go in the same order without the gaps, in both "Western" and "Eastern". This is nothing but a shift of 1728.
So, one of the ways to convert it:
static readonly int easternToWesternShift =
(int)'٠' - (int)'0';
static char EasternToWestern(char eastern) {
return (char)(eastern - easternToWesternShift);
}
And the like… And so on…
—SA