R
Roedy Green
The problem with encodings is they are not attached in any way or
embedded in any way in a file. You are just supposed to know how a
file is encoded.
Here is my idea to solve the problem.
We invent a new encoding.
Files in this encoding begin with a 0 byte, then an ASCII string
giving the name of a conventional encoding then another 0 byte.
When you read a file with this encoding, the header is invisible to
your application. When you write a file, a header for a UTF8 file gets
written automatically.
You write your app telling it to read and write this new encoding e.g.
"labeled".
You can write a utilty to import files into your labelled universe by
detecting or guessing or being told the encoding. It gets a header.
Other than that the file is unmodified.
embedded in any way in a file. You are just supposed to know how a
file is encoded.
Here is my idea to solve the problem.
We invent a new encoding.
Files in this encoding begin with a 0 byte, then an ASCII string
giving the name of a conventional encoding then another 0 byte.
When you read a file with this encoding, the header is invisible to
your application. When you write a file, a header for a UTF8 file gets
written automatically.
You write your app telling it to read and write this new encoding e.g.
"labeled".
You can write a utilty to import files into your labelled universe by
detecting or guessing or being told the encoding. It gets a header.
Other than that the file is unmodified.