Re: [sqlite] SQLite encoding-specific functions
On 6 Apr 2014, at 21:28, Richard Hipp wrote: > On Sun, Apr 6, 2014 at 4:18 PM, Ben wrote: > >> Hi all, >> >> Is there any advantage to using the encoding specific functions from the C >> api? >> >> For example, given a database with its encoding set to UTF-16, should I >> try to use the _bytes16() / _text16() functions? >> >> Or should I just say "I'm UTF-8 all the way" and use the other functions, >> allowing SQLite to do the conversion for me? >> >> I realise that both methods work, but I'm wondering if one is actually the >> more correct way. >> >> >> > If you request text in the same encoding as it is stored in the database > file, it runs faster. > > My advice: Always use the UTF8 functions and strive to ensure that all of > your databases use the UTF8 encoding. > > -- > D. Richard Hipp Thanks very much, this simplifies things a bit. - Ben ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite encoding-specific functions
On Sun, Apr 6, 2014 at 4:18 PM, Ben wrote: > Hi all, > > Is there any advantage to using the encoding specific functions from the C > api? > > For example, given a database with its encoding set to UTF-16, should I > try to use the _bytes16() / _text16() functions? > > Or should I just say "I'm UTF-8 all the way" and use the other functions, > allowing SQLite to do the conversion for me? > > I realise that both methods work, but I'm wondering if one is actually the > more correct way. > > > If you request text in the same encoding as it is stored in the database file, it runs faster. My advice: Always use the UTF8 functions and strive to ensure that all of your databases use the UTF8 encoding. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite encoding-specific functions
Hi all, Is there any advantage to using the encoding specific functions from the C api? For example, given a database with its encoding set to UTF-16, should I try to use the _bytes16() / _text16() functions? Or should I just say "I'm UTF-8 all the way" and use the other functions, allowing SQLite to do the conversion for me? I realise that both methods work, but I'm wondering if one is actually the more correct way. - Ben ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users