I'm using MS Access / VBA to interface into a package that gets screwed up by "non-English" text characters so I've had to build code to replace them by acceptable "English" ones. Tedious but not difficult, you may have thought.
Look at the following (simplified) code and results though, and you'll see that there seems to be a problem using the REPLACE
function.
? xText
Hildegard Von Bingen: Geistliche Ges+ñnge
If I use REPLACE
against field xText
containing "Hildegard Von Bingen: Geistliche Ges+ñnge"
, it doesn't replace the +ñ
with e
:
? replace(xText,"+ñ","e")
Hildegard Von Bingen: Geistliche Ges+ñnge
If I use it against the raw string Hildegard Von Bingen: Geistliche Ges+ñnge"
it does the replace as expected:
? replace("Hildegard Von Bingen: Geistliche Ges+ñnge","+ñ","e")
Hildegard Von Bingen: Geistliche Gesenge
If I try something slightly different against the field, it replaces the H
and the h
, as expected:
? replace(xText,"H","-")
-ildegard Von Bingen: Geistlic-e Ges+ñnge
What am I missing?