But what would be the cure?
  1. Stop pretending that unicode is 'forwards compatible' from ASCII.

    The least useful property of unicode is that a trivial subset of it can appear to be 'simple text'.

  2. Stop pretending that unicode isn't a binary format.

    Every other binary format in common use, self-identifies through the use of 'signatures'. Eg. "GIF87a" & "GIF89a".

  3. Recognise that unicode isn't a single format, but many formats all lumped together in a confused and confusing mess.

    Some parts have several names, some of which are deprecated. Other associated terms have meant, and in some cases still do mean, two or more different things.

  4. Recognise that there is no need and no real benefit to the "clever" variable length encoding used by some of the formats.

    It creates far more problems than it fixes; and is the archetypal 'premature optimisation' that has long since outlived its benefit or purpose.

  5. Keep the good stuff -- the identification and standardisation of glyphs, graphemes and code points -- and rationalise the formats to a single, fixed-width, self-identifying format.

    Just imagine how much simpler, safer, and more efficient it would be if you could read the first few bytes of a file and *know* what it contains.

    Imagine how much more efficient it would be if to read the 10 characters starting at the 1073741823th character of a file, you simply did (say):

    seek FH, 1073741823 * 3 + SIG_SIZE, 0; read( FH, $in, 10 * 3 );

    Instead of having to a) guess the encoding; b) read all the bytes from the beginning counting characters as you go.

    Imagine all the other examples of stupid guesswork and inefficiency that I could have used.

    Imagine not having to deal with any of them.

Imagine that programmers said "enough is enough"; give us a simple, single, sane, self-describing format for encoding the world's data.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^3: JSON::XS (and JSON::PP) appear to generate invalid UTF-8 for character in range 127 to 255 by BrowserUk
in thread JSON::XS (and JSON::PP) appear to generate invalid UTF-8 for character in range 127 to 255 by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.