Skip to content

Support UTF-8 keys#928

Merged
themisir merged 5 commits into
masterfrom
themisir/utf8_keys
Mar 20, 2022
Merged

Support UTF-8 keys#928
themisir merged 5 commits into
masterfrom
themisir/utf8_keys

Conversation

@themisir

Copy link
Copy Markdown
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 force-pushed the themisir/utf8_keys branch from 8c4895c to da5e674 Compare March 11, 2022 15:12
@themisir themisir marked this pull request as ready for review March 11, 2022 15:54
@alexobviously

Copy link
Copy Markdown

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
Copy Markdown
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

SNNafi commented Mar 13, 2023

Copy link
Copy Markdown
Contributor

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

SNNafi commented Mar 13, 2023

Copy link
Copy Markdown
Contributor

Giving a PR

@themisir

Copy link
Copy Markdown
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