On Thu, 20 Apr 2006, DBTools Software wrote:

>Hi,
>
>I have an application that needs to open a database in the users's personal
>folder. I noticed that in some circunstances the sqlite3_open fail as the
>filename is in UTF16 format. I don't know that in advance so I could open
>the db with sqlite3_open16.
>
>The question is:
>
>Is it safe to always use the UTF16 functions independent of the
>localization? What I mean is can I use the functions sqlite3_xxx16 instead
>of sqlite3_xxx for all cases?


Your data should always be in UTF-16 to use sqlite3_xxx16, else you'll
incur the cost of transforming your date to/from UTF-8.

If most of your data is UTF-8 or ASCII, use the regular UTF-8 functions.
If your filename is UTF-16, just convert it to UTF-8 (it's a relatively
simple, unambiguous transformation) and use sqlite3_open.


>
>Thanks,
>
>COS
>
>

-- 
    /"\
    \ /    ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
     X                           - AGAINST MS ATTACHMENTS
    / \

Reply via email to