storesafe / cordova-sqlite-evcore-extbuild-free

Cordova sqlite plugin with Android performance enhancements for PhoneGap Build, GPL v3 or commercial license options
Other
24 stars 13 forks source link

Support EU characters in UPPER & LOWER functions #50

Open brodycj opened 5 years ago

brodycj commented 5 years ago

A customer is interested in support for the EU characters in the UPPER function, as a quick solution to support case-insensitive string comparisons.

The LOWER function would likely be updated as well in order to maintain symmetry as much as possible.

The implementation would likely be similar to: https://www.sqlite.org/src/dir?ci=4979f138e8c8bef7&name=ext/icu

It is not yet determined whether or not to update LIKE and REGEXP.

P.S. This feature should function consistently on all supported platforms (Android, iOS, macOS, and Windows).

brodycj commented 5 years ago

The following EU UPPER character mappings were requested by the customer:

In most if not all cases, the LOWER EU character mapping would simply be the reverse of the above UPPER character mappings.

DanielSWolf commented 5 years ago

The conversion can never be truly symmetric because there are cases where multiple lower-case characters correspond to the same upper-case character. For example, both ď and ð will become Đ in UPPER. If the result were given to LOWER, it would have no way of knowing what the original character was.

For this reason, we plan on using only the UPPER function for comparisons. We have no need for an extended LOWER function. But it wouldn't be a problem for us if you implemented both.