Function InStr with Japanese Windows: strange return value
Dear all,
I have found a strange behavior of VBA InStr function in Japanese language in Japanese Windows.
(WinXP Pro SP2, Office 2003 Pro)
InStr function: InStr([start, ]string1,string2[,compare])
While a Japanese Katakana character with "tenten" or "maru" appears in a string1, InStr(string1, string2) returns a wrong result:
sTest="ヘルプabc"
InStr(sTest, "a") = 5 (should be 4)
(while: Len(sTest) = 6; Mid(sTest, 4) = "abc"; LenB(sTest) = 12 )
However, if I use it with vbBinaryCompare, it returns a right value:
InStr(1, sTest, "a", vbBinaryCompare) = 4.
Furthermore, it does not happen with Windows XP English version.
Do you have any idea? Is this a bug?
Thank you.

