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

Custom upper() function gives wrong results #34

Closed
DanielSWolf opened this issue Apr 21, 2021 · 4 comments · Fixed by brody4hire/sqlite3-eu#1 or #37
Closed

Custom upper() function gives wrong results #34

DanielSWolf opened this issue Apr 21, 2021 · 4 comments · Fixed by brody4hire/sqlite3-eu#1 or #37

Comments

@DanielSWolf
Copy link

This repo contains a custom upper() function, implemented in #21. We just discovered that there are three characters that aren't handled correctly in this function. It seems that this is my fault, as these errors are contained in the original character table I gave you in #21.

@brodybits This bug isn't critical by any means. Maybe it could be fixed in the course of porting our custom features to the official repo.

Input Output Expected
đ (Latin Small Letter D with Stroke, U+0111) Ď (Latin Capital Letter D with Caron, U+010E) Đ (Latin Capital Letter D with Stroke, U+0110)
ď (Latin Small Letter D with Caron, U+010F) Đ (Latin Capital Letter D with Stroke, U+0110) Ď (Latin Capital Letter D with Caron, U+010E)
ð (Latin Small Letter Eth, U+00F0) Đ (Latin Capital Letter D with Stroke, U+0110) Ð (Latin Capital Letter Eth*, U+00D0)

*Note: "Latin Capital Letter D with Stroke" and "Latin Capital Letter Eth" are visually identical, but have different Unicode code points.

We're tracking this issue internally as PRDXMIP-2391.

@brody4hire
Copy link
Collaborator

Hi @DanielSWolf I just found this ticket. My apologies for the delay.

I may need some time to double-check my understanding of this issue before working on a solution.

As you may know, the code would need to be updated in this project: https://github.com/brodybits/sqlite3-eu

This means that I may be able to get this fixed in this repo ... which could expedite the validation from your side.

@DanielSWolf
Copy link
Author

Hi @brodybits,

No problem about the delay. Thanks for looking into it!

@DanielSWolf
Copy link
Author

DanielSWolf commented Sep 9, 2021

The fix should be as easy as changing the three incorrect Unicode code points in your lookup table. I've just created a PR: brody4hire/sqlite3-eu#1

@brody4hire
Copy link
Collaborator

brody4hire commented Sep 10, 2021

Thanks @DanielSWolf for contributing the quick solution ... just merged!

I am now reopening this issue with some TODO items:

  • rebuild Android NDK library with this bug fix
  • test on all supported platforms Android, iOS, and now deprecated platforms Windows, macOS
  • add UPPER character tests to the test suite in main cordova-sqlite-storage plugin version, to be eventually merged into this and other plugin forks

@brody4hire brody4hire reopened this Sep 10, 2021
brody4hire pushed a commit to brody4hire/sqlite3-eu that referenced this issue Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants