Text is converted to bytes using UTF-8 encoding. Leading zero bytes are counted separately.
The bytes are treated as a big integer using base-256 arithmetic.
That integer is repeatedly divided by 58 — each remainder maps to the Base58 alphabet: 1-9A-HJ-NP-Za-km-z
Leading zero bytes become 1 characters. Base58 has no padding — output length varies by input.
Excluded chars: 0 (zero), O (uppercase O), I (uppercase i), l (lowercase L) — all visually ambiguous.