J
Joy
Function IsGoodAcii(c As String) As Boolean
Dim ObjRegExp As Object
Set ObjRegExp = CreateObject("vbscript.regexp")
ObjRegExp.Global = True
ObjRegExp.Pattern = "[^\x20-\x7E]"
IsGoodAcii = ObjRegExp.test(c)
End Function
We use the above the code to detect non-ASCII char in Name
We have values like 'ABC', which are simply English characters. The above
checker works alright. However
for some computers, especially with non-English language, the above function
detects that the value is not ASCII.
Why it works OK for some machines but fails on others (with non-English
language)?
Thanks
Dim ObjRegExp As Object
Set ObjRegExp = CreateObject("vbscript.regexp")
ObjRegExp.Global = True
ObjRegExp.Pattern = "[^\x20-\x7E]"
IsGoodAcii = ObjRegExp.test(c)
End Function
We use the above the code to detect non-ASCII char in Name
We have values like 'ABC', which are simply English characters. The above
checker works alright. However
for some computers, especially with non-English language, the above function
detects that the value is not ASCII.
Why it works OK for some machines but fails on others (with non-English
language)?
Thanks