Currently, Rushomon uses a standard base 62 alphabet for generating random short codes. While this maximizes the namespace, it includes visually ambiguous characters (such as 0 vs O, and 1 vs l vs I).
For use cases where short URLs are frequently printed on physical media, displayed on screens, or shared verbally, these characters can cause confusion and lead to broken link visits.
Proposed Solution
I would like to propose adding an instance-level setting to exclude ambiguous characters. When enabled, the link generator would omit easily confused characters, likely following a standard base 58 alphabet approach which removes 0 (zero) O (capital o) I (capital i) and l (lowercase L).
Implementation Details
- Add a new boolean setting (e.g.,
exclude_ambiguous_chars) to the settings database table.
- Add a toggle switch to the Admin Settings UI.
- Update
src/utils/short_code.rs to support two alphabets: the current BASE62_CHARS and a new BASE58_CHARS, selecting between them based on the active setting.
An alternative could simply be to switch to base 58 completely, which would not significantly impact namespace availability, but this implementation would preserve the existing default.
Currently, Rushomon uses a standard base 62 alphabet for generating random short codes. While this maximizes the namespace, it includes visually ambiguous characters (such as
0vsO, and1vslvsI).For use cases where short URLs are frequently printed on physical media, displayed on screens, or shared verbally, these characters can cause confusion and lead to broken link visits.
Proposed Solution
I would like to propose adding an instance-level setting to exclude ambiguous characters. When enabled, the link generator would omit easily confused characters, likely following a standard base 58 alphabet approach which removes
0(zero)O(capital o)I(capital i) andl(lowercase L).Implementation Details
exclude_ambiguous_chars) to thesettingsdatabase table.src/utils/short_code.rsto support two alphabets: the currentBASE62_CHARSand a newBASE58_CHARS, selecting between them based on the active setting.An alternative could simply be to switch to base 58 completely, which would not significantly impact namespace availability, but this implementation would preserve the existing default.