GithubHelp home page GithubHelp logo

Comments (7)

tzvetkoff avatar tzvetkoff commented on July 26, 2024

Well, to all my understanding, Hashids was (at least at first) meant to encode IDs to a URL-compatible string.
Wide characters, along with UTF8, are something that's much more complicated to even consider.
From what I've checked, only the JS implementation got this correctly.
And if we're thinking of multibyte support, we'd better go with UTF8.

from hashids.c.

tzvetkoff avatar tzvetkoff commented on July 26, 2024

@ivanakimov, can you give us a follow-up?
Do we need multibyte support in Hashids?
Also, if needed, don't we need to (shoot in the dark) release it as, say, 2.0, and give the users the ability to define their own "separators" - "cfhistuCFHISTU" works well for english words, but try that in cyrillic.

from hashids.c.

thedrow avatar thedrow commented on July 26, 2024

The Python implementation handles Unicode correctly as well.

from hashids.c.

jd327 avatar jd327 commented on July 26, 2024

@tzvetkoff I'm not sure I'm qualified to talk about best way to implement this in C, but regarding the custom separators, that would have to be a part of the next major release (along with faster consistent shuffle, and better handling of large numbers).

It's on my todo.

from hashids.c.

randolf avatar randolf commented on July 26, 2024

For URL compatibility you'll want to look into PunyCode.

Of course, Unicode characters somewhat defeats the purpose of shortening numbers down to shorter strings since more 8-bit bytes are needed to store Unicode sequences.

from hashids.c.

edescourtis avatar edescourtis commented on July 26, 2024

Any progress on this?

from hashids.c.

thedrow avatar thedrow commented on July 26, 2024

No. I didn't have a need for it eventually.
Feel free to contribute :)

from hashids.c.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.