"??" <[EMAIL PROTECTED]> wrote in
message
news:[EMAIL PROTECTED]
> I've got a problem here regarding file name encoding under Linux:
> when you say that file names feed to sqlite3_open() functions should
> be encoded in UTF-8, do you really mean that?
>
> So if I convert the file name from current locale encoding to UTF-8,
> then the SQLite library code will need to convert it back before pass
> it to system APIs, do the SQLite developers really implement it that
> way?

At least on Windows, yes, it's indeed implemented this way (the native 
Windows API for opening a file accepts file names either in system 
default codepage, or in UTF-16; SQLite probably uses the latter flavor). 
Don't know about Linux.

My guess is, it's done this way because file names may appear in a SQL 
statement (see ATTACH), and the statement's text has to be in either 
UTF-8 or UTF-16. So for consistency, all means of opening a file accept 
the same encoding.

Igor Tandetnik



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

Reply via email to