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 UTF-8 keys #928

Merged
merged 5 commits into from
Mar 20, 2022
Merged

Support UTF-8 keys #928

merged 5 commits into from
Mar 20, 2022

Conversation

themisir
Copy link
Contributor

This PR adds support for using unicode keys using UTF-8 encoding. There will be no backwards compatibility issue because ASCII is compatible with UTF-8 encoding.

Closes #159, #717, #412, #84, #37

@themisir themisir marked this pull request as draft March 11, 2022 15:07
@themisir themisir marked this pull request as ready for review March 11, 2022 15:54
@alexobviously
Copy link

This looks good to me. Functionality works as expected (stored and retrieved entries with keys containing vietnamese letters). Tested with one of my finished apps that uses Hive and everything works as it did previously.

@themisir
Copy link
Contributor Author

Thanks @alexobviously 😇

@themisir themisir merged commit 2d1ff42 into master Mar 20, 2022
@themisir themisir deleted the themisir/utf8_keys branch March 20, 2022 12:23
@SNNafi
Copy link
Contributor

SNNafi commented Mar 13, 2023

Hello @themisir , Shouldn't this check be removed?

https://github.com/hivedb/hive/blob/1451845d080007d8e9169798b4dda81cbd6c08fd/hive/lib/src/hive_impl.dart#L77-L78

Can't use Future<BoxBase<E>> _openBox<E> due to this with non ASCII string

@SNNafi
Copy link
Contributor

SNNafi commented Mar 13, 2023

Giving a PR

@themisir
Copy link
Contributor Author

Hello @themisir , Shouldn't this check be removed?

This PR adds utf8 support for the keys not the box names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keys... Unicode some time soon ?
3 participants