aseemk / bases.js

Utility for converting numbers to/from different bases/alphabets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crockford interpretation

oaustegard opened this issue · comments

Crockford's base32 isn't just about removing potentially confused characters, it is also about gracefully handling what happens when one of them is provided: e.g. oO0 all are interpreted as 0, iIlL1 are all interpreted as 1, and so on.
It's hard to implement this gracefully - a naïve C# implementation is here (at one point served as the basis for a homegrown url shortener) https://github.com/austegard/Squrl/blob/master/HumanBase32.cs