[odb-users] SQLite and std::wstring
Philippe Cadieux-Pelletier
philly.dilly at gmail.com
Wed Jun 6 22:04:58 EDT 2012
It seems like a pretty severe shortcoming of the SQLite database binding
not to support std::wstring. Are there any plans to add support? I can
think of two ways to add support off the top of my head:
1. Have some kind of setting, either at compile time or runtime, that
will bind SQLite's TEXT type to std::wstring and configure the SQLite
database to use utf16 for TEXT. This would mean that you would have to pick
either utf8 or utf16, but at least you'd have the option of supporting
std::wstring.
2. C++ 11 adds std::codecvt_utf8_utf16 to convert between utf8 and
utf16. It would then be possible to convert at runtime therefore being able
to support both std::string and std::wstring
Thanks!
More information about the odb-users
mailing list