Language change proposal

Michael Hobbs michael@REDACTED
Mon Nov 3 17:08:35 CET 2003


Richard A. OKeefe said:
> My point
> is that IF you are going to do this, you had better say up front with a
> -erlang(Encoding,Version) declaration, which character set you are using
> in those comments and strings, lest they be misunderstood.

Not to sidetrack this topic even further, but I will... :-)

I've always found it interesting that the XML specification does not
explicitly specify which encoding should be used for the encoding
declaration. (e.g. "<?xml encoding='UTF-8'?>") The closest it comes to
making such a specification is the line, "it is an error for an entity
including an encoding declaration to be presented to the XML processor in
an encoding other than that named in the declaration, or for an entity
which begins with neither a Byte Order Mark nor an encoding declaration to
use an encoding other than UTF-8."

That line seems to imply that if an entity contains an encoding
declaration, then the whole entity must be encoded with that encoding.
This presents a chicken-or-egg problem in that how is an XML processor to
process an encoding declaration before it knows what the encoding is?

So, to bring the wagons back around to Erlang, if there ever is an
-erlang(Encoding, Version) declaration, it would be nice if it is clearly
stated what encoding should be used for the "-erlang(Encoding, Version)"
text.

- Michael Hobbs





More information about the erlang-questions mailing list