On 12/14/2015 7:42 PM, Bart Smissaert wrote: > Yes, str and str2 are Unicode string, 2 bytes per character. > lPos counts per character, not byte, so if the string in the database is > abcde and I want to find the first position > of d in that string then lPos will be 4.
... and then you pass (lPos-2)*2 == 4 - but the string "abc" is not 4 bytes long, no matter how you count. >> You are converting in one direction (SQLite to VB), but not in the other > I thought SQLite would handle VB Unicode strings to UTF8 strings It would, if you use the correct API function, so that SQLite knows that the string is in fact Unicode. -- Igor Tandetnik