Windows (NT, 2000, XP etc..) unicode strings are in UCS-2 (!= UTF-16)
You should be calling SHGetSpecialFolderPathW (note the W at the end)
with a 'wide' buffer for the "My Documents" directory, before
converting this to UTF-8 and passing it to sqlite_open().
HTH.

On 24/04/06, COS <[EMAIL PROTECTED]> wrote:
> Thanks for the clarification. This information got me to the right
> direction. I have found the "MultiByteToWideChar" function. It does what I
> need. But instead of making conversions I decided to use the "IsTextUnicode"
> function (I didn't know that one either) which provides far more information
> about the string. If it returns true then I can safely (I suppose) use the
> sqlite3_open16 to open the database. In my tests it worked perfectly, but I
> guess the best way to really test this is asking some of our users to do so.
> ;-)
>
> Thanks a lot for your time and help on this. You really helped me a lot.
>
> Best Regards,
>
> COS
>
>

Reply via email to