[erlang-questions] First Erlang experiences- not so good

Dave Smith <>
Fri Sep 26 00:58:16 CEST 2008


2008/9/25 Tony Cappellini <>

>
> I use Scintilla Text Editor daily for python, Windows batch files,
> C/C++ and have no problems.
> This is the first language I've worked with that is sensitive to the
> encodings used.
>
>
Yes, some languages support multiple character encodings.  Some will check
the first two bytes of the file and assume an encoding based on a
byte-order-mark(BOM). Some also support directives that will allow the
programmer to specify an encoding (possibly in a comment)

Recent python interpreters do:
http://www.python.org/dev/peps/pep-0263/

The XML standard does as well
http://www.w3.org/TR/xml11/#sec-guessing-no-ext-info

In any case, I avoid  UCS-2 or or any UTF-16 variant to store source code.
These would effectively double the byte size of my code (I know hard-drives
are cheep, but waste-not want-not).  If you do use a lot of non-ascii
characters in your python code UTF-8 is the way to go.

You do have me thinking about what it would take to write an alternate
Erlang pre-compiler that will do this type of decoding. Hmmm. A weekend
research project for me. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080925/45e44229/attachment.html>


More information about the erlang-questions mailing list