[erlang-questions] First Erlang experiences- not so good
Fri Sep 26 04:02:59 CEST 2008
On Sep 25, 2008, at 5:13 PM, Robert Virding wrote:
> 2008/9/26 Dave Smith <>
> 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. :)
> If you were to make these modifications in file_server/
> file_io_server then you wouldn't have to make any modifications
> io_lib, erl_scan, ... These would still work out of the bag. The
> only problem is detecting you are using UTF-8, UTF-16... when you
> open the file.
The usual approach seems to be to examine the first couple bytes to
look for a BOM, and otherwise assume ASCII. (Python also allows a
special comment in the first two lines, and Perl has a lexically
scoped 'use utf8' pragma.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions