OpenNTF.org - LotusScript - Remove accents i
My Links (Not logged in)
Code Bin Search
 
Hosted by Prominic.NET
Rate This Code
5 - brilliant stuff
4 - very nice
3 - average
2 - needs work
1 - bad
   OpenNTF Code Bin
About This Code
Brief Description:
LotusScript - Remove accents in string 
Rating:
Not Rated Yet 
Contributor:
Benoit Dubuc 
Category:
Lotusscript 
Type:
String functions 
Notes Version:
R4.x, R6.x, R5.x, R7.x 
Last Modified:
07 Mar 2007 
OpenNTF Disclaimer

All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.

Code / Description
I can't take the credit for that, as I found this on a VB forum somewhere.


This code removes accentuated characters and replaces them by their non accentuated coutnerparts.
This is for standard ASCII characters.

Here is the function:

Function RemoveAccents(strIn As String) As String
Dim strOut As String
Dim strMid As String
Dim n As Integer
For n = 1 To Len(strIn)
strMid = Mid(strIn, n, 1)
Select Case Asc(strMid)
Case 192 To 197:
strMid = "A"
Case 198:
strMid = "AE"
Case 199:
strMid = "C"
Case 200 To 203:
strMid = "E"
Case 204 To 207:
strMid = "I"
Case 208:
strMid = "D"
Case 209:
strMid = "N"
Case 210 To 214, 216:
strMid = "O"
Case 215:
strMid = "x"
Case 217 To 220:
strMid = "U"
Case 221:
strMid = "Y"
Case 222, 254:
strMid = "p"
Case 223:
strMid = "B"
Case 224 To 229:
strMid = "a"
Case 230:
strMid = "ae"
Case 231:
strMid = "c"
Case 232 To 235:
strMid = "e"
Case 236 To 239:
strMid = "i"
Case 240, 242 To 246, 248:
strMid = "o"
Case 241:
strMid = "n"
Case 249 To 252:
strMid = "u"
Case 253, 255:
strMid = "y"
End Select
RemoveAccents= RemoveAccents+ strMid
Next
End Function

Usage / Example
MsgBox RemoveAccents("Éric Dôbîlà") displays Eric Dobila
 Comments

No documents found

 Add your comment!