On 2014/11/18 15:12, Richard Hipp wrote:
CREATE TABLE example(x TEXT);
INSERT INTO example(x) VALUES('हैलो, विश्व');
SELECT * FROM example;

The point being that Hindi isn't special, the presented characters are Unicode just like all the others - as long as your DB text encoding is set to UTF-8 or better (which is almost guaranteed), you can add any language characters. Fixing sorting collations for those languages is a different matter, but solutions do exist and are regularly seen here (if that becomes needed).

If you are using the sqlite_bind*16 type API in C or some high-level language, you might need to convert from the internal Unicode representations to the SQLite standard code-points as per the selected encoding (which is not an SQLite problem but because some languages use different internal representations or code points or translations than the standard). Most use Unicode16le MBCS internal memory and translate on the fly (because it is easier and fast) to UTF-8 etc, so if you simply move the bytes from memory, you might end up with every second byte being a Zero or similar which is of course incorrect for how SQLite expects the value. Linux, Windows and MacOS all have internal APIs for converting between most Unicode formats. I'm sure the same is true for mobile and other platforms, but have no direct experience to confirm it.

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

Reply via email to