Re: Is this String class properly implemented?
On May 8, 8:12 pm, Jerry Coffin <jcof...@taeus.com> wrote:
In article <UWOMl.18752$8_3.6...@flpi147.ffdc.sbc.com>, t...@my.net
says...
[ ... ]
Oh? Is that why such care was taken with the Unicode spec to
make sure that it mapped nicely onto ASCII? ASCII will never
die. It is fundamental and foundational and for lots of
programs, complete (read: all that is necessary).
You're right about one or two points, but not in the way you
think. For example, it's true that ASCII won't die -- but only
because it's already been dead and buried for decaded. Unicode
and ISO 10646 weren't written particularly to be compatible
with ASCII -- they were written to be compatible with the
common base area of ISO 8859. Claiming that's "ASCII" does
nothing more than display ignorance of both standards.
And the common base area of ISO 8859 was compatible with ASCII.
Historically, this was an issue: when ISO 8859 was introduced,
we still wanted to be able to read and interpret existing files,
and even today, a file written using just the printable
characters from ASCII will encode the same in all of the ISO
8859 encodings and in UTF-8. A useful characteristic if you
want to determine the encoding from the contents of the file
(e.g. as in XML)---you limit the characters in the file to just
this small set until you've specified the encoding, and the
parsing code doesn't have to commit to the actual encoding until
after it has read the specification.
[ ... ]
You do have something of a point -- if you restrict your
target audience sufficiently, you can also restrict some
of what is supports (such as different character sets).
There is a large set of programs that fall in that category.
I suppose that depends on how you define "large". My immediate
guess would be that it's a single-digit percentage.
Of those programs dealing with text. If you include all
programs, I suspect that most programs (e.g. the one which
controls the ignition in your car) don't use any character data
at all, so strictly speaking, they don't need more than plain
ASCII (since they don't even need that).
Of course, that's totally irrelevant to the argument about which
encoding to use for text data. (For what its worth, I've seen
more EBCDIC in the last ten years than I've seen ASCII.)
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34