Posted By

emregulcan on 03/30/10


Tagged

c char convert turkish


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

emregulcan


Convert special Turkish chars to international Latin chars


 / Published in: C#
 

  1. public static string ConvertTurkishChars(string text)
  2. {
  3. String[] olds = { "Ğ", "ğ", "Ü", "ü", "Ş", "ş", "İ", "ı", "Ö", "ö", "Ç", "ç" };
  4. String[] news = { "G", "g", "U", "u", "S", "s", "I", "i", "O", "o", "C", "c" };
  5.  
  6. for (int i = 0; i < olds.Length; i++)
  7. {
  8. text = text.Replace(olds[i], news[i]);
  9. }
  10.  
  11. text = text.ToUpper();
  12.  
  13. return text;
  14. }

Report this snippet  

You need to login to post a comment.