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

upper and lower functions only work correctly on ascii characters #9053

Closed
Omega359 opened this issue Jan 29, 2024 · 1 comment · Fixed by #9054
Closed

upper and lower functions only work correctly on ascii characters #9053

Omega359 opened this issue Jan 29, 2024 · 1 comment · Fixed by #9054
Labels
bug Something isn't working

Comments

@Omega359
Copy link
Contributor

Describe the bug

Upper and lower should function against the unicode code properties for their respective case. I believe this boils down to using string.to_ascii_lowercase() and string.to_ascii_uppercase() vs string.to_lowercase() and string.to_uppercase()

If you use a unicode LC_CTYPE in postgres (not C) then the corresponding calls will properly respect the unicode code properties.

To Reproduce

❯ select upper('árvore ação αβγ');
+--------------------------------+
| upper(Utf8("árvore ação αβγ")) |
+--------------------------------+
| áRVORE AçãO αβγ |
+--------------------------------+

❯ select lower('ÁRVORE AÇÃO ΑΒΓ');
+--------------------------------+
| lower(Utf8("ÁRVORE AÇÃO ΑΒΓ")) |
+--------------------------------+
| Árvore aÇÃo ΑΒΓ |
+--------------------------------+

Expected behavior

upper and lower respect the unicode code maps.

Additional context

No response

@Omega359 Omega359 added the bug Something isn't working label Jan 29, 2024
@Omega359
Copy link
Contributor Author

I'm working on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant