0

I need to compare strings containing Turkish characters (üğşıçö). Unfortunately, culture settings do not satisfy my needs. I have to broaden the rules to make it more flexible. Program should recognize the following:

  • S = Ş = s = ş
  • G = Ğ = g = ğ
  • O = Ö = o = ö
  • C = Ç = c = ç
  • U = Ü = u = ü
  • I = İ = ı = i

So users could input in standard English keyboard. How can I achieve this?

Emre Can Serteli
  • 389
  • 1
  • 7
  • 17
  • Try solutions from this answer: http://stackoverflow.com/questions/20674577/how-to-compare-unicode-characters-that-look-alike/20674360#20674360 – Tony Dec 23 '13 at 02:43

1 Answers1

1

You could use String.Replace to turn your strings into some sort of "Middle Format" that recognizes Turkish characters and English characters to be the same, and compare them after? Would that satisfy your requirements?

bool MiddleCompare(string eng, string turk)
{
    //Replace turkish characters with english here
    //Compare the newly formatted string, return true/false
}
miguelarcilla
  • 1,426
  • 1
  • 20
  • 38