From 5c7c5e272ac9f2ef3f838d7e09abfed0aee3ac66 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Wed, 11 Apr 2018 17:04:39 -0400 Subject: [PATCH] Fix for multi-byte UTF-8 characters on Android (cordova-sqlite-evcore-legacy-ext-common-free 0.0.6) using cordova-sqlite-evcore-free-dependencies 0.8.2 ref: - litehelpers/Cordova-sqlite-evcore-extbuild-free#19 - litehelpers/Android-sqlite-evcore-native-driver-free#1 - litehelpers/Android-sqlite-evcore-native-driver-free#2 --- CHANGES.md | 7 +++++++ README.md | 1 - package.json | 4 ++-- plugin.xml | 2 +- spec/www/spec/db-tx-string-test.js | 5 ++--- spec/www/spec/db-tx-value-bindings-test.js | 6 ++---- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index d0f53a4..6e86ed2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,12 @@ # Changes +### cordova-sqlite-evcore-legacy-ext-common-free 0.0.6 + +- Use cordova-sqlite-evcore-free-dependencies 0.8.2 with fix for multi-byte UTF-8 characters on Android ref: + - litehelpers/Cordova-sqlite-evcore-extbuild-free#19 () + - litehelpers/Android-sqlite-evcore-native-driver-free#1 () + - litehelpers/Android-sqlite-evcore-native-driver-free#2 () + ### cordova-sqlite-evcore-legacy-ext-common-free 0.0.5 - Use cordova-sqlite-evcore-free-dependencies 0.8.2 with SQLite 3.22.0, with SQLITE_DEFAULT_SYNCHRONOUS=3 (EXTRA DURABLE ref: litehelpers/Cordova-sqlite-storage#736) & other build fixes diff --git a/README.md b/README.md index 95af163..a6aac87 100644 --- a/README.md +++ b/README.md @@ -483,7 +483,6 @@ As "strongly recommended" by [Web SQL Database API 8.5 SQL injection](https://ww - Infinity (positive or negative) values are not supported on Android/iOS/macOS due to issues described above including a possible crash on iOS/macOS (ref: [litehelpers/Cordova-sqlite-storage#405](https://github.com/litehelpers/Cordova-sqlite-storage/issues/405)) or a hanging transaction queue on Android. - A stability issue was reported on the iOS platform version when in use together with [SockJS](http://sockjs.org/) client such as [pusher-js](https://github.com/pusher/pusher-js) at the same time (see [litehelpers/Cordova-sqlite-storage#196](https://github.com/litehelpers/Cordova-sqlite-storage/issues/196)). The workaround is to call sqlite functions and [SockJS](http://sockjs.org/) client functions in separate ticks (using setTimeout with 0 timeout). - SQL errors are reported with an INCORRECT error code (0) on Windows ref: [litehelpers/Cordova-sqlite-storage#539](https://github.com/litehelpers/Cordova-sqlite-storage/issues/539). In certain cases SQL errors are also reported with error code 0 on Android in case the built-in Android database is used (using the `androidDatabaseImplementation: 2` setting in `window.sqlitePlugin.openDatabase`). -- Multi-byte UTF-8 characters not working on all Android systems (issue discovered on Intel `x86` / `x86_64` - default [Android-sqlite-evcore-native-driver-free](https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free) database access implementation) ref: [litehelpers/Cordova-sqlite-evcore-extbuild-free#19](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/19) - Issue on default [Android-sqlite-evcore-native-driver-free](https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free) database access implementation in case of database file name with multi-byte UTF-8 characters ref: [litehelpers/Cordova-sqlite-evcore-extbuild-free#25](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/25) - The default Android-sqlite-evcore-native-driver-free database access implementation is known to crash on certain Android versions in case of database file names with emoji and other 4-byte UTF-8 characters ref: [litehelpers/Cordova-sqlite-evcore-extbuild-free#26](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/26) - Issue (truncation issue) with NULL characters (`'\0\` or `'\u0000'`) on Android (default Android-sqlite-evcore-native-driver-free database access implementation) and Windows ref: [litehelpers/Cordova-sqlite-evcore-extbuild-free#27](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/27) diff --git a/package.json b/package.json index 2db4e90..a9f0434 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-sqlite-evcore-legacy-ext-common-free", - "version": "0.0.5", + "version": "0.0.6", "description": "Cordova/PhoneGap sqlite storage - free enterprise version with performance improvements for Android (legacy common version branch with external sqlite3 dependencies)", "cordova": { "id": "cordova-sqlite-evcore-legacy-ext-common-free", @@ -30,7 +30,7 @@ }, "homepage": "https://github.com/litehelpers/cordova-sqlite-evcore-legacy-ext-common-free", "dependencies": { - "cordova-sqlite-evcore-free-dependencies": "0.8.2" + "cordova-sqlite-evcore-free-dependencies": "0.8.3" }, "scripts": { "start": "node scripts/prepareSpec.js" diff --git a/plugin.xml b/plugin.xml index 7a794f0..f100dbb 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="0.0.6"> Cordova sqlite storage - free enterprise version with performance improvements for Android (legacy common version branch with external sqlite3 dependencies) diff --git a/spec/www/spec/db-tx-string-test.js b/spec/www/spec/db-tx-string-test.js index 8b1db37..91fbd54 100755 --- a/spec/www/spec/db-tx-string-test.js +++ b/spec/www/spec/db-tx-string-test.js @@ -593,8 +593,7 @@ var mytests = function() { }, MYTIMEOUT); it(suiteName + 'string parameter value manipulation test with UTF-8 2-octet character é', function(done) { - if (isAndroid && !isWebSql && !isImpl2) pending('XXX SKIP: BUG on Android (default Android-sqlite-evcore-native-driver access implementation)'); // XXX ref: litehelpers/Cordova-sqlite-evcore-extbuild-free#19 - + // ref: litehelpers/Cordova-sqlite-evcore-extbuild-free#19 var db = openDatabase("UTF8-2-octet-upper-value-string-test.db", "1.0", "Demo", DEFAULT_SIZE); db.transaction(function(tx) { @@ -649,8 +648,8 @@ var mytests = function() { }, MYTIMEOUT); it(suiteName + 'string parameter value manipulation test with UTF-8 3-octet character €', function(done) { + // ref: litehelpers/Cordova-sqlite-evcore-extbuild-free#19 if (isWP8) pending('SKIP for WP(8)'); - if (isAndroid && !isWebSql && !isImpl2) pending('XXX SKIP: BUG on Android (default Android-sqlite-evcore-native-driver access implementation)'); // XXX ref: litehelpers/Cordova-sqlite-evcore-extbuild-free#19 var db = openDatabase("UTF8-3-octet-string-upper-value-test.db", "1.0", "Demo", DEFAULT_SIZE); diff --git a/spec/www/spec/db-tx-value-bindings-test.js b/spec/www/spec/db-tx-value-bindings-test.js index 407b7fb..918ad2c 100755 --- a/spec/www/spec/db-tx-value-bindings-test.js +++ b/spec/www/spec/db-tx-value-bindings-test.js @@ -101,8 +101,7 @@ var mytests = function() { }, MYTIMEOUT); it(suiteName + 'INSERT TEXT string with é (UTF-8 2 octets), SELECT the data, check, and check HEX value [UTF-16le on Windows]', function(done) { - if (isAndroid && !isWebSql && !isImpl2) pending('XXX SKIP: BUG on Android (default Android-sqlite-evcore-native-driver access implementation)'); // XXX ref: litehelpers/Cordova-sqlite-evcore-extbuild-free#19 - + // ref: litehelpers/Cordova-sqlite-evcore-extbuild-free#19 var db = openDatabase('INSERT-UTF8-2-octets-and-check.db', '1.0', 'Demo', DEFAULT_SIZE); db.transaction(function(tx) { @@ -142,8 +141,7 @@ var mytests = function() { }, MYTIMEOUT); it(suiteName + 'INSERT TEXT string with € (UTF-8 3 octets), SELECT the data, check, and check HEX value [UTF-16le on Windows]', function(done) { - if (isAndroid && !isWebSql && !isImpl2) pending('XXX SKIP: BUG on Android (default Android-sqlite-evcore-native-driver access implementation)'); // XXX ref: litehelpers/Cordova-sqlite-evcore-extbuild-free#19 - + // ref: litehelpers/Cordova-sqlite-evcore-extbuild-free#19 var db = openDatabase('INSERT-UTF8-3-octets-and-check.db', '1.0', 'Demo', DEFAULT_SIZE); db.transaction(function(tx) {