How to Convert Persian Digits in variable to English Digits Using Culture?

Simply Use the code below :

private string changePersianNumbersToEnglish(string input)
{
  string[] persian = new string[10] { "۰", "۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹" };

   for (int j=0; j<persian.Length; j++)
      input = input.Replace(persian[j], j.ToString());

   return input;
 }

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)