From 748579417a2bc688c2bd63f7aac813b53c3a5455 Mon Sep 17 00:00:00 2001 From: kakysha Date: Tue, 22 Aug 2017 15:00:28 +0300 Subject: [PATCH] Fix for turkish and other foreign locales ref: https://github.com/litehelpers/Cordova-sqlite-storage/pull/713 --- CHANGES.md | 4 ++++ package.json | 2 +- plugin.xml | 2 +- src/android/io/sqlc/SQLiteAndroidDatabase.java | 4 +++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b779b23ef..1b9cee80b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changes +## cordova-sqlite-storage 2.2.0-pre1 + +- Fix SQLiteAndroidDatabase implementation for Turkish and other foreign locales + ## cordova-sqlite-storage 2.1.5 ##### cordova-sqlite-legacy-core 1.0.7 diff --git a/package.json b/package.json index 56d988a4a..d5cee6f4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-sqlite-storage", - "version": "2.1.5", + "version": "2.2.0-pre1", "description": "Native interface to SQLite for PhoneGap/Cordova", "cordova": { "id": "cordova-sqlite-storage", diff --git a/plugin.xml b/plugin.xml index 6076b23c7..d2c3a094b 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="2.2.0-pre1"> Cordova sqlite storage plugin diff --git a/src/android/io/sqlc/SQLiteAndroidDatabase.java b/src/android/io/sqlc/SQLiteAndroidDatabase.java index f4e053e5a..1fa44831e 100644 --- a/src/android/io/sqlc/SQLiteAndroidDatabase.java +++ b/src/android/io/sqlc/SQLiteAndroidDatabase.java @@ -24,6 +24,8 @@ import java.lang.IllegalArgumentException; import java.lang.Number; +import java.util.Locale; + import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -549,7 +551,7 @@ static QueryType getQueryType(String query) { // (needed for SQLCipher version) if (first.length() == 0) throw new RuntimeException("query not found"); - return QueryType.valueOf(first.toLowerCase()); + return QueryType.valueOf(first.toLowerCase(Locale.ENGLISH)); } catch (IllegalArgumentException ignore) { // unknown verb (NOT blank) return QueryType.other;