Thanks for the advice Jens. My problem is the software I use (Embarcadero c++ 
builder) is more utf16 orientated. It does support utf8 but many of the built 
in functions return System.UnicodeString which is utf16.





From: Jens Alfke<mailto:j...@mooseyard.com>
Sent: 02 February 2017 17:32
To: SQLite mailing list<mailto:sqlite-users@mailinglists.sqlite.org>
Subject: Re: [sqlite] Help with custom collation



Perhaps off-topic, but: UTF-16 is generally not recommended, unless you need to 
work with legacy APIs that require it. It has the same difficulties as UTF-8 
(having to handle characters broken into multi-element sequences) but uses more 
RAM and isn’t downward compatible with ASCII. Also, since you’re less likely to 
run into multi-word character sequences in normal use [if you’re non-Asian], 
it’s easier to miss bugs in your multi-word character handling. (Tip: put some 
emoji in your test strings!)

(A UTF-16 collator is also probably going to be slower than a UTF-8 one, since 
SQLite will need to copy/expand the UTF-8 strings from the database when it 
calls it. And yes, collators can easily become performance bottlenecks; I’ve 
seen it.)

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

Reply via email to