Hi,

 

I'm not sure if this is the right place to ask or has been covered
already (haven't been able to find any reference to this issue), but
does sqlite3_open_v2 have to take a UTF-8 formatted string for the
filename?  

 

SQLITE_API int sqlite3_open_v2(

  const char *filename,   /* Database filename (UTF-8) */

  sqlite3 **ppDb,         /* OUT: SQLite db handle */

  int flags,              /* Flags */

  const char *zVfs        /* Name of VFS module to use */

);

 

I'm using sqlite through Qt and the problem I'm having is that in non
utf locales (e.g. ja_JP.PCK on solaris) when given a shift-jis encoded
to utf-8 string to open, the file being created is using the utf-8
characters, i.e. when the file is ls'd the characters are garbled.  If a
full path containing any non-ascii characters is given the file fails to
be found given the different encodings.

 

I've been going through the sqlite code shipped with qt (it's the
amalgamated source so a bit of light reading ;) ) - but does anyone know
off hand if there will be untoward issues with sqlite if I modified the
qt call to sqlite so that a locale encoded string instead of utf-8 is
passed across?   

 

I'm quite happy to modify the code as necessary but I am not sure as to
what things might break or what problems to look out for.

 

Regards,

Alex Kides

 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to