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

Kevin Scaldeferri kevin@REDACTED
Fri Sep 26 04:02:59 CEST 2008


On Sep 25, 2008, at 5:13 PM, Robert Virding wrote:

> 2008/9/26 Dave Smith <dave.smith.to@REDACTED>
>
>
> 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.)


-kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080925/740a6234/attachment.htm>


More information about the erlang-questions mailing list