‹ BackHN Continuity

Thread

UTF-8000: Unlimited UTF-8

134 points · 122 comments · vismit2000

  1. zahlman · · focus · HN ↗
    Since the Unicode Consortium isn't going to actually assign those code points, this is functionally just a scheme for encoding variable-length integers designed as an extension of UTF-8 more or less arbitrarily.

    There&#x27;s a long history of designs for these (<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Variable-length_integer" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Variable-length_integer) that the author might be interested in. I used to think about these things myself, including the &quot;zigzag encoding&quot; for signed values (not a difficult idea; this &quot;marvelous bijective mapping&quot; is the standard one used in math class to demonstrate that the integers are countable, and the nice implementation properties are a consequence of the choice to &quot;zig&quot; from 0 to -1 first combined with how two&#x27;s-complement works).

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.