Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools



Click here to copy the following block
' Replace all accented characters in the input string
' Note: this function was written according to Italian rules. Rules for your
' language may vary, for example È may not be converted to "E'" as it is in
' Italian
'
' Example:
'  Debug.WriteLine(ReplaceAccentedChars("È vero che funziona? Certo che lo è,
' non può non funzionare"))
'   ' => E' vero che funziona? Certo che lo e', non puo' non funzionare

Function ReplaceAccentedChars(ByVal input As String) As String
  input = input.Replace("À", "A")
  input = input.Replace("Á", "A")
  input = input.Replace("Â", "A")
  input = input.Replace("Ã", "A")
  input = input.Replace("Ä", "A")
  input = input.Replace("â", "a")
  input = input.Replace("ã", "a")
  input = input.Replace("ä", "a")
  input = input.Replace("à", "a'")
  input = input.Replace("á", "a'")

  input = input.Replace("È", "E'")
  input = input.Replace("É", "E'")
  input = input.Replace("Ê", "E")
  input = input.Replace("Ë", "E")
  input = input.Replace("ê", "e")
  input = input.Replace("ë", "e")
  input = input.Replace("è", "e'")
  input = input.Replace("é", "e'")

  input = input.Replace("Ì", "I")
  input = input.Replace("Í", "I")
  input = input.Replace("Î", "I")
  input = input.Replace("Ï", "I")
  input = input.Replace("î", "i")
  input = input.Replace("ï", "i")
  input = input.Replace("ì", "i'")
  input = input.Replace("í", "i'")

  input = input.Replace("Ò", "O")
  input = input.Replace("Ó", "O")
  input = input.Replace("Ô", "O")
  input = input.Replace("Õ", "O")
  input = input.Replace("Ö", "O")
  input = input.Replace("ô", "o")
  input = input.Replace("õ", "o")
  input = input.Replace("ö", "o")
  input = input.Replace("ò", "o'")
  input = input.Replace("ó", "o'")

  input = input.Replace("Ù", "U")
  input = input.Replace("Ú", "U")
  input = input.Replace("Û", "U")
  input = input.Replace("Ü", "U")
  input = input.Replace("û", "u")
  input = input.Replace("ü", "u")
  input = input.Replace("ù", "u'")
  input = input.Replace("ú", "u'")

  input = input.Replace("Ý", "Y")
  input = input.Replace("ý", "y")
  input = input.Replace("ñ", "n")

  Return input
End Function


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.