Put this function into a module (this is only for OS X):
[code]Function GreekToLatin(Extends s As String) As String
Declare Function CFStringCreateMutableCopy Lib “CoreFoundation” (CFAllocatorRef As Ptr, _
maxLength As Integer, theString As CFStringRef) As Ptr
Declare Function CFStringTransform Lib “CoreFoundation” (CFMutableStringRef As Ptr, CFRange As Ptr, _
transform As CFStringRef, reverse As Boolean) As Boolean
Declare Function UTF8String Lib “Foundation” Selector “UTF8String” (NSString As Ptr) As CString
Dim mutableStringRef As Ptr = CFStringCreateMutableCopy(Nil, 0, s)
If Not CFStringTransform(mutableStringRef, Nil, “Greek-Latin; Latin-ASCII”, False) Then
Raise New RuntimeException()
End
Return UTF8String(mutableStringRef)
End Function[/code]
Use it like this:
Dim greek As String = "????????????????????????????????"
Dim latin As String = greek.GreekToLatin()
aabgdeeziithiiklmnxooprsstyyfchpsoo // what you want
aabgdeezeethiiklmn'xooprsstyuphchpsoo // what you get with above function
The function does not return exactly what you need. You will have to dive into ICU User Guide to fine tune “Greek-Latin; Latin-ASCII” in the above function call.