SQLite Forum

null character sorts greater than 0x7f and less than 0x80
Login
That refers to "encoding", not "decoding".

That a particular sequence of code may produce the same result upon decoding by the same decoder and that the choice of sequence is up to the encoder, means that the "encoder" has a problem.

The fact that a sequence B when decoded using method X produces output A (which is not distinguishable from the original input) proves that B is a valid encoding of A.  The decoder cannot possibly know that fact unless it re-encodes A with a different compliant encoder X1 to produce sequence B1 different from B.  This is a verification of the **contents** of the encoded text rather than merely the syntax of the encoding.

It is not the job of the decoder to validate the contents of the stream it is processing.