I develop c++ app for Windows.
I will use SQLite 3 to store:
Just use UTF-8, which is the default.
The various UTF-16 encodings waste space (except when the vast majority of text in the DB is non-ASCII), which requires more I/O, which makes everything slower.
16 functions convert their parameters from/to UTF-8 and then call an internal function that uses UTF-8, so they will always be slower.
While functions with
16 in their name receive and return UTF-16 strings, this is independent of the database's actual encoding (all functions convert from/to UTF-8 or UTF-16 as required).
16 use UTF-8, which is just a different encoding. The set of characters you can use is exactly the same in both cases, and the SQL always behaves the same.
Some functions (e.g.,
sqlite3_open_v2) are not available in a
16 functions makes sense only if you are forced to use UTF-16 strings for other reasons, and would have to convert anyway.