Skip to content

Commit

Permalink
Fix for multi-byte UTF-8 characters on Android
Browse files Browse the repository at this point in the history
(cordova-sqlite-evcore-legacy-ext-common-free 0.0.6)

using cordova-sqlite-evcore-free-dependencies 0.8.2

ref:
- storesafe/cordova-sqlite-evcore-extbuild-free#19
- storesafe/android-sqlite-evcore-ndk-driver-free#1
- storesafe/android-sqlite-evcore-ndk-driver-free#2
  • Loading branch information
Christopher J. Brody committed Apr 11, 2018
1 parent 2db1f1a commit 5c7c5e2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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 (<https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free/issues/19>)
- litehelpers/Android-sqlite-evcore-native-driver-free#1 (<https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free/pull/1>)
- litehelpers/Android-sqlite-evcore-native-driver-free#2 (<https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free/pull/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
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-sqlite-evcore-legacy-ext-common-free"
version="0.0.5">
version="0.0.6">

<name>Cordova sqlite storage - free enterprise version with performance improvements for Android (legacy common version branch with external sqlite3 dependencies)</name>

Expand Down
5 changes: 2 additions & 3 deletions spec/www/spec/db-tx-string-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);

Expand Down
6 changes: 2 additions & 4 deletions spec/www/spec/db-tx-value-bindings-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 5c7c5e2

Please sign in to comment.