nhar...@gmail.com wrote:
> Say, suppose I write a SQLite query to insert Japanese text which is encoded
> in EUC-JP, in to a table in SQLite database (UTF-8 encoding).

Don't. SQLite doesn't know anything about EUC-JP. Any string you pass to SQLite 
must be in UTF-8 or UTF-16. SQLite will convert between these two if the 
encoding you pass doesn't match that of the database - that's the only kind of 
conversion SQLite knows how to do.

> Is it that, the encoding of the text will be automatically converted from
> EUC-JP to UTF-8 for storage by the SQLite engine?

No. The string will be misinterpreted as being UTF-8. At best, it will be 
stored and returned back to you as is. At worst, it will be mangled when SQLite 
tries to convert it to UTF-16.

> Does the user has to take care of the encoding conversion before inserting
> such a text into the database, making sure that data inserted is always in
> UTF-8 encoding?

Yes.
-- 
Igor Tandetnik

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

Reply via email to