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

Sorting the alphabet causes incompatability with other shortuuid libraries #104

Closed
joshuamckenty opened this issue Apr 20, 2024 · 1 comment · Fixed by #107
Closed

Sorting the alphabet causes incompatability with other shortuuid libraries #104

joshuamckenty opened this issue Apr 20, 2024 · 1 comment · Fixed by #107

Comments

@joshuamckenty
Copy link

It would be nice if the default alphabet matched other implementations (such as

Their default alphabet is "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ" (obviously a different interpretation of the Flicker Base58).

When we set the alphabet on this library to "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ", it transparently resorts it to "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", which breaks compatibility.

Maybe a dont_sort=False parameter could be added to set_alphabet?

@skorokithakis
Copy link
Owner

Hmm, sure, that seems like a reasonable feature. PRs welcome!

skorokithakis pushed a commit that referenced this issue Dec 10, 2024
* refactor: Add should_sort arg to set_alphabet

* feat: add should_sort kwarg to Django Field

* refactor: changes should_sort kwarg name and default value

* docs: Update README.md
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 a pull request may close this issue.

2 participants