Reputation: 22936
I'm writing a VB script to replace words in a word doc.
The crux of the code is:
strEuropeanOld="European"
strEuropeanNew="Européen"
I then replace the word:
If InStr(FileText, strEuropeanOld) Then
WriteLog("Replacing " & strEuropeanOld & " with " & strEuropeanNew & ".")
FileText = Replace(FileText, strEuropeanOld, strEuropeanNew)
WriteLog("Text replaced")
Else
WriteLog(strEuropeanOld & " was not found in the file.")
strCount2 = strCount2 +1
End If
All works perfectly for words without accents e.g. é.
However those with accents come out as Europ饮
rather than Européen
after translation!
Any ideas?!
Upvotes: 2
Views: 1110
Reputation: 598
This is due to the encoding used. Check this link, they are talking about a similar issue. Unicode to UTF-8
Hope this helps.
Upvotes: 1