Index: Doc/Extra/Provider/version.html
==================================================================
--- Doc/Extra/Provider/version.html
+++ Doc/Extra/Provider/version.html
@@ -51,10 +51,11 @@
Prevent the IDataReader.GetDataTypeName method from throwing "No current row" exceptions. Fix for [94252b9059].
When BinaryGUID handling is off, transform the LINQ parameter types as well. Fix for [a4d9c7ee94]. ** Potentially Incompatible Change **
The IDataReader.GetDataTypeName method should always return the declared type name. ** Potentially Incompatible Change **
Add DefaultFlags_SQLiteConnection environment variable to enable customization of the default connection flags.
Prevent calls to sqlite3_step() and sqlite3_interrupt() from being interrupted via ThreadAbortException.
+ Make sure enabling UseUTF16Encoding sets the schema encoding to UTF-16. Fix for [7c151a2f0e].
1.0.96.0 - March 5, 2015
- Prevent the IDataReader.GetOrdinal method from throwing "No current row" exceptions. Fix for [2be4298631], [abad7c577d], and [c28d7fe915].
- When counting the number of tables in the GetSchemaTable method, do not include those that have a null or empty name. Fix for [92dbf1229a].
Index: SQLite.Interop/src/win/interop.c
==================================================================
--- SQLite.Interop/src/win/interop.c
+++ SQLite.Interop/src/win/interop.c
@@ -392,11 +392,20 @@
#if defined(INTEROP_DEBUG) && (INTEROP_DEBUG & INTEROP_DEBUG_OPEN16)
sqlite3InteropDebug("sqlite3_open16_interop(): sqlite3_open_interop(\"%s\", %d, %p) returned %d.\n", filename, flags, ppdb, ret);
#endif
if ((ret == SQLITE_OK) && ppdb && !DbHasProperty(*ppdb, 0, DB_SchemaLoaded))
+ {
ENC(*ppdb) = SQLITE_UTF16NATIVE;
+
+#if SQLITE_VERSION_NUMBER >= 3008008
+ //
+ // BUGFIX: See ticket [7c151a2f0e22804c].
+ //
+ SCHEMA_ENC(*ppdb) = SQLITE_UTF16NATIVE;
+#endif
+ }
return ret;
}
SQLITE_API const char *WINAPI sqlite3_errmsg_interop(sqlite3 *db, int *plen)
ADDED Tests/tkt-7c151a2f0e.eagle
Index: Tests/tkt-7c151a2f0e.eagle
==================================================================
--- /dev/null
+++ Tests/tkt-7c151a2f0e.eagle
@@ -0,0 +1,72 @@
+###############################################################################
+#
+# tkt-7c151a2f0e.eagle --
+#
+# Written by Joe Mistachkin.
+# Released to the public domain, use at your own risk!
+#
+###############################################################################
+
+package require Eagle
+package require Eagle.Library
+package require Eagle.Test
+
+runTestPrologue
+
+###############################################################################
+
+package require System.Data.SQLite.Test
+runSQLiteTestPrologue
+
+###############################################################################
+
+set character \UDDFDD83D; # NOTE: This is little-endian.
+
+###############################################################################
+
+runTest {test tkt-7c151a2f0e-1.1 {Open with UseUTF16Encoding=False} -setup {
+ set fileName tkt-7c151a2f0e-1.1.db
+ setupDb $fileName "" "" "" "" UseUTF16Encoding=False
+} -body {
+ sql execute $db "CREATE TABLE t1(x TEXT);"
+
+ sql execute $db [appendArgs "INSERT INTO t1 (x) VALUES(?);"] \
+ [list param1 String $character]
+
+ list [sql execute -execute scalar $db "PRAGMA encoding;"] \
+ [sql execute -execute scalar $db "SELECT x FROM t1;"]
+} -cleanup {
+ cleanupDb $fileName
+
+ unset -nocomplain db fileName
+} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
+System.Data.SQLite} -result [appendArgs "UTF-8 " $character]}
+
+###############################################################################
+
+runTest {test tkt-7c151a2f0e-1.2 {Open with UseUTF16Encoding=True} -setup {
+ set fileName tkt-7c151a2f0e-1.2.db
+ setupDb $fileName "" "" "" "" UseUTF16Encoding=True
+} -body {
+ sql execute $db "CREATE TABLE t1(x TEXT);"
+
+ sql execute $db [appendArgs "INSERT INTO t1 (x) VALUES(?);"] \
+ [list param1 String $character]
+
+ list [sql execute -execute scalar $db "PRAGMA encoding;"] \
+ [sql execute -execute scalar $db "SELECT x FROM t1;"]
+} -cleanup {
+ cleanupDb $fileName
+
+ unset -nocomplain db fileName
+} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
+System.Data.SQLite} -result [appendArgs "UTF-16le " $character]}
+
+###############################################################################
+
+unset -nocomplain character
+
+###############################################################################
+
+runSQLiteTestEpilogue
+runTestEpilogue
Index: readme.htm
==================================================================
--- readme.htm
+++ readme.htm
@@ -218,10 +218,11 @@
- Prevent the IDataReader.GetDataTypeName method from throwing "No current row" exceptions. Fix for [94252b9059].
- When BinaryGUID handling is off, transform the LINQ parameter types as well. Fix for [a4d9c7ee94]. ** Potentially Incompatible Change **
- The IDataReader.GetDataTypeName method should always return the declared type name. ** Potentially Incompatible Change **
- Add DefaultFlags_SQLiteConnection environment variable to enable customization of the default connection flags.
- Prevent calls to sqlite3_step() and sqlite3_interrupt() from being interrupted via ThreadAbortException.
+ - Make sure enabling UseUTF16Encoding sets the schema encoding to UTF-16. Fix for [7c151a2f0e].
1.0.96.0 - March 5, 2015
Index: www/news.wiki
==================================================================
--- www/news.wiki
+++ www/news.wiki
@@ -12,10 +12,11 @@
- Prevent the IDataReader.GetDataTypeName method from throwing "No current row" exceptions. Fix for [94252b9059].
- When BinaryGUID handling is off, transform the LINQ parameter types as well. Fix for [a4d9c7ee94]. ** Potentially Incompatible Change **
- The IDataReader.GetDataTypeName method should always return the declared type name. ** Potentially Incompatible Change **
- Add DefaultFlags_SQLiteConnection environment variable to enable customization of the default connection flags.
- Prevent calls to sqlite3_step() and sqlite3_interrupt() from being interrupted via ThreadAbortException.
+ - Make sure enabling UseUTF16Encoding sets the schema encoding to UTF-16. Fix for [7c151a2f0e].
1.0.96.0 - March 5, 2015