aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-09-07 13:58:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-09-07 13:58:47 +0200
commit4e7f517a711d9b6e95512cad1891710bcd591034 (patch)
tree7a11b6958c13c7c68fe1959e042bdd513a49e32b
parent517ea9bd35ff406c0c7908f678b3fee17a280969 (diff)
Add support for passing database name as std::wstring on Windows
-rw-r--r--sqlite/database/driver.cxx13
1 files changed, 12 insertions, 1 deletions
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 <cassert>
+
#include <odb/sqlite/database.hxx>
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)