[odb-users] SQLite and std::wstring

Boris Kolpackov boris at codesynthesis.com
Mon Jun 11 05:24:05 EDT 2012

Hi Phil,

philly.dilly at gmail.com <philly.dilly at gmail.com> writes:

> I played around a little  bit trying to implement specialization of
> class odb::sqlite::value_traits<std::wstring, id_text> however it
> seems like the odb compiler doesn't like that I include <codecvt>.

AFAIK, std::codecvt is defined in <locale>, not <codecvt>. Also note
that by default the ODB compiler compiles in the C++98 mode so the
new UTF-8/UTF-16 stuff won't be available. To switch to the C++11 mode
you will need to pass '--std c++11' option. 

> Furthermore, this step seems superfluous since sqlite natively
> supports utf16. When I have some more time, I might play around with
> adding the value text16 to enum odb::sqlite::bind::buffer_type which
> will use the native sqlite utf16 api since it seems to me like the
> logical way to add utf16 support.

Right, that's exactly what we are planning to do. However, there are
some architectural issues that we first need to resolve to be able
to support such "dual images" (i.e., TEXT can be mapped to a UTF-8
or UTF-16 image). Also, once we have this worked out, it will also
be fairly straightforward to add support for streaming BLOB interface
for SQLite.


More information about the odb-users mailing list