Skip to content

Commit

Permalink
Fix for turkish and other foreign locales
Browse files Browse the repository at this point in the history
  • Loading branch information
kakysha authored and Christopher J. Brody committed Jan 4, 2018
1 parent ed630b2 commit 7485794
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
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-storage"
version="2.1.5">
version="2.2.0-pre1">

<name>Cordova sqlite storage plugin</name>

Expand Down
4 changes: 3 additions & 1 deletion src/android/io/sqlc/SQLiteAndroidDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 7485794

Please sign in to comment.