Skip to content

Feature Request: Option to exclude ambiguous characters from generated short codes #215

@mfcarroll

Description

@mfcarroll

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

  1. Add a new boolean setting (e.g., exclude_ambiguous_chars) to the settings database table.
  2. Add a toggle switch to the Admin Settings UI.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA new feature to be implemented

    Projects

    Status

    Next Version

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions