Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support EU characters in UPPER & LOWER functions #50

Open
brodycj opened this issue Jun 4, 2019 · 2 comments
Open

Support EU characters in UPPER & LOWER functions #50

brodycj opened this issue Jun 4, 2019 · 2 comments

Comments

@brodycj
Copy link
Contributor

brodycj commented Jun 4, 2019

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
Copy link
Contributor Author

brodycj commented Jun 4, 2019

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

  • äÄ
  • àÀ
  • áÁ
  • âÂ
  • ãÃ
  • åÅ
  • ǎǍ
  • ąĄ
  • ăĂ
  • æÆ
  • āĀ
  • çÇ
  • ćĆ
  • ĉĈ
  • čČ
  • đĎ
  • ďĐ
  • ðĐ
  • èÈ
  • éÉ
  • êÊ
  • ëË
  • ěĚ
  • ęĘ
  • ėĖ
  • ēĒ
  • ĝĜ
  • ģĢ
  • ğĞ
  • ĥĤ
  • ìÌ
  • íÍ
  • îÎ
  • ïÏ
  • ıI
  • īĪ
  • įĮ
  • ĵĴ
  • ķĶ
  • ĺĹ
  • ļĻ
  • łŁ
  • ľĽ
  • ñÑ
  • ńŃ
  • ňŇ
  • ņŅ
  • öÖ
  • òÒ
  • óÓ
  • ôÔ
  • õÕ
  • őŐ
  • øØ
  • œŒ
  • ŕŔ
  • řŘ
  • ß
  • śŚ
  • ŝŜ
  • şŞ
  • šŠ
  • șȘ
  • ťŤ
  • ţŢ
  • þÞ
  • țȚ
  • üÜ
  • ùÙ
  • úÚ
  • ûÛ
  • űŰ
  • ũŨ
  • ųŲ
  • ůŮ
  • ūŪ
  • ŵŴ
  • ýÝ
  • ÿŸ
  • ŷŶ
  • źŹ
  • žŽ
  • żŻ

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

@DanielSWolf
Copy link

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.

brodycj added a commit to brodycj/sqlite3-eu that referenced this issue Jun 10, 2022
to code & documentation

- add references for EU character mappings
  - mobilexag/cordova-sqlite-evplus-ext-free#21
  - storesafe/cordova-sqlite-evcore-extbuild-free#50 (comment)
- update documentation of known issue with SELECT LOWER_EU(9e999) &
  SELECT LOWER_EU(-9e999)
brodycj added a commit to brodycj/sqlite3-eu that referenced this issue Jun 10, 2022
to code & documentation

- add references for EU character mappings
  - mobilexag/cordova-sqlite-evplus-ext-free#21
  - storesafe/cordova-sqlite-evcore-extbuild-free#50 (comment)
- update documentation of known issue with SELECT LOWER_EU(9e999) &
  SELECT LOWER_EU(-9e999)
brodycj added a commit to brodycj/sqlite3-eu that referenced this issue Jun 10, 2022
to code & documentation

- add references for EU character mappings
  - mobilexag/cordova-sqlite-evplus-ext-free#21
  - storesafe/cordova-sqlite-evcore-extbuild-free#50 (comment)
- add reference to cordova-sqlite-storage test suite from:
  - https://github.com/storesafe/cordova-sqlite-storage/tree/6.0.0/spec
- update documentation of known issue with SELECT LOWER_EU(9e999) &
  SELECT LOWER_EU(-9e999)
brodycj added a commit to brodycj/sqlite3-eu that referenced this issue Jun 10, 2022
to code & documentation

- add references for EU character mappings
  - mobilexag/cordova-sqlite-evplus-ext-free#21
  - storesafe/cordova-sqlite-evcore-extbuild-free#50 (comment)
- add reference to cordova-sqlite-storage test suite from:
  - https://github.com/storesafe/cordova-sqlite-storage/tree/6.0.0/spec
- add reference to:
  - https://www.compart.com/en/unicode/U+0131
- test one-way U+0131 (`ı`) -> capital I
- update reproduction & documentation of known issue with
  U+0131 (`ı`) & capital I
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants