On 4/2/2012 5:34 PM, Simon Slavin wrote:
Hmm.  It's there:

<http://www.gnu.org/software/libunistring/manual/libunistring.html#unistr_002eh>

"The following function compares two Unicode strings of possibly different 
lengths.

— Function: int u8_cmp2 (const uint8_t *s1, size_t n1, const uint8_t *s2, 
size_t n2)
— Function: int u16_cmp2 (const uint16_t *s1, size_t n1, const uint16_t *s2, 
size_t n2)
— Function: int u32_cmp2 (const uint32_t *s1, size_t n1, const uint32_t *s2, 
size_t n2)
Compares s1 and s2, lexicographically. Returns a negative value if s1 compares 
smaller than s2, a positive value if s1 compares larger than s2, or 0 if they 
compare equal."

I wonder whether it respects languages.

These don't, but u8_strcoll et al supposedly do, based on LC_COLLATE locale category. Herein lies the problem: if you build an index using these functions while running under locale A, then try to run queries against this database in an application running with locale B, bad things happen. From the point of view of the second application, the index is corrupted.
--
Igor Tandetnik

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

Reply via email to