Comments (7)
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.
@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.
The Python implementation handles Unicode correctly as well.
from hashids.c.
@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.
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.
Any progress on this?
from hashids.c.
No. I didn't have a need for it eventually.
Feel free to contribute :)
from hashids.c.
Related Issues (8)
- Support uint128_t as well on platforms/compilers that support it HOT 2
- Hashids.c is not thread-safe HOT 1
- Use integer floor division when possible
- Vectorize hashids_shuffle
- Hashids compatibility between C version and Swift version HOT 2
- Safe hashids_decode HOT 1
- Statement may fall through - warning in GCC7 and upper HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hashids.c.