Skip to content

Instantly share code, notes, and snippets.

@mcanvar
Created March 27, 2016 18:36
Show Gist options
  • Save mcanvar/512c99a54c81fefcd661 to your computer and use it in GitHub Desktop.
Save mcanvar/512c99a54c81fefcd661 to your computer and use it in GitHub Desktop.
Visual Basic function that converts the special Turkish characters to English ones.
Function trCharToEn(string As String) As String
If String.IsNullOrEmpty(string) Then Return String.Empty
string = Replace(string, Chr(199), "C")
string = Replace(string, Chr(208), "G")
string = Replace(string, Chr(221), "I")
string = Replace(string, Chr(214), "O")
string = Replace(string, Chr(222), "S")
string = Replace(string, Chr(231), "c")
string = Replace(string, Chr(240), "g")
string = Replace(string, Chr(253), "i")
string = Replace(string, Chr(254), "s")
string = Replace(string, Chr(246), "o")
string = Replace(string, Chr(252), "u")
Return string
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment