Click here to Skip to main content
15,877,754 members
Please Sign up or sign in to vote.
2.18/5 (3 votes)
See more:
How can change Persian numbers to English numbers in
When I read any Persian numbers from an excel file, I want to change them to English numbers.
Updated 19-Aug-14 6:12am
Sergey Alexandrovich Kryukov 18-Aug-14 13:10pm    
There are no Persian or English numbers, there are Persian and English numerals, that is, characters.
Now, as to the Persian numerals, the are either "Western Arabic numerals" or "Eastern Arabic numerals". Please see:,
If those are what you mean, the are quite easy to convert... What did you try?
If not, what did you mean?

1 solution

Let's assume you need to convert Eastern Arabic to Western.

Look for example, at this table:[^].

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'; // two zeros

static char EasternToWestern(char eastern) {
    return (char)(eastern - easternToWesternShift);

And the like… And so on…

Share this answer
Maciej Los 19-Aug-14 11:07am    
Sergey Alexandrovich Kryukov 19-Aug-14 11:23am    
Thank you, Maciej.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900