On 2 Apr 2012, at 10:24pm, Simon Slavin <slav...@bigfraud.org> wrote:
> On 2 Apr 2012, at 9:58pm, Alexey Pechnikov <pechni...@mobigroup.ru> wrote: > >> Description: Unicode string library for C >> The 'libunistring' library implements Unicode strings (in the UTF-8, >> UTF-16, and UTF-32 encodings), together with functions for >> Unicode characters (character names, classifications, properties) and >> functions for string processing (formatted output, width, word >> breaks, line breaks, normalization, case folding, regular expressions). >> >> This package contains the shared library. >> Homepage: http://www.gnu.org/software/libunistring/ > > Trying to figure out what SQLite would want from Unicode characters I don't > end up with any of those. I think all it wants is sorting, so SQLite can > make an index properly. 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. I don't think so, but I can live without it. Time to hack up an external function for SQLite and see how little of the library I need to make it work. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users