From 4e7f517a711d9b6e95512cad1891710bcd591034 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 7 Sep 2012 13:58:47 +0200 Subject: Add support for passing database name as std::wstring on Windows --- sqlite/database/driver.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sqlite/database/driver.cxx b/sqlite/database/driver.cxx index bccdab9..cb531c6 100644 --- a/sqlite/database/driver.cxx +++ b/sqlite/database/driver.cxx @@ -2,9 +2,11 @@ // copyright : Copyright (c) 2009-2012 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file -// Test that database constructors are unambiguous (compilation only). +// Test that database constructors are unambiguous and some other things. // +#include + #include using namespace odb::sqlite; @@ -12,6 +14,15 @@ using namespace odb::sqlite; int main (int argc, char* argv[]) { + // Test UTF-16 to UTF-8 conversion. + // +#ifdef _WIN32 + { + database d (L"t\x00C8st"); + assert (d.name () == "t\xC3\x88st"); + } +#endif + // This code should not execute. // if (argc != 0) -- cgit v1.1