[erlang-bugs] FW: Bug in Erlang/OTP 17 [RELEASE CANDIDATE 1]

Andreas Schumacher andreas@REDACTED
Fri Feb 21 17:25:41 CET 2014


As Steve pointed out, bug.erl was encoded as ISO-8559-1/Latin-1 and not 
as UTF-8.

As a special case, if you only use non-ASCII characters in comments, 
another alternative is to convert the file to UTF-8; for example, by 
instructing your editor to do so or by using iconv:

$ iconv -f ISO-8859-1 -t UTF-8 bug.erl -o bug.erl

Andreas

> *From:*erlang-bugs-bounces@REDACTED 
> [mailto:erlang-bugs-bounces@REDACTED] *On Behalf Of *Steve Vinoski
> *Sent:* den 21 februari 2014 16:38
> *To:* Vlad Dumitrescu
> *Cc:* erlang-bugs
> *Subject:* Re: [erlang-bugs] Bug in Erlang/OTP 17 [RELEASE CANDIDATE 1]
>
> Agreed. On OS X:
>
> $ file -I bug.erl
>
> bug.erl: text/plain; charset=iso-8859-1
>
> Adding %% -*- coding: utf-8 -*- to the top of the file causes the file 
> to be saved as UTF-8:
>
> $ file -I bug.erl
>
> bug.erl: text/plain; charset=utf-8
>
> and after that, the compiler -- or more specifically, the 
> file_io_server -- is happy again.
>
> --steve
>
> On Fri, Feb 21, 2014 at 10:29 AM, Vlad Dumitrescu <vladdu55@REDACTED 
> <mailto:vladdu55@REDACTED>> wrote:
>
> Hi Joe,
>
> Are you sure it's encoded in utf-8 originally? The file I downloaded 
> isn't but it might be any of the systems it went through that messed 
> it up.
>
> regards,
>
> Vlad
>
> On Fri, Feb 21, 2014 at 2:07 PM, Joe Armstrong <joearms@REDACTED 
> <mailto:joearms@REDACTED>> wrote:
>
>     I can't compile files with UFT characters in R17
>
>     With R17 [RELEASE CANDIDATE 1]
>
>     $ erlc bug.erl
>
>     bug.erl:8: cannot parse file, giving up
>
>     bug.erl:8: no module definition
>
>     bug.erl:8: cannot translate from UTF-8
>
>     With R16B
>
>     joe:paradis-master joe$ ~/nobackup/otp_src_R16B/bin/erlc bug.erl
>
>     Cheers
>
>     /Joe
>
>     _______________________________________________
>     erlang-bugs mailing list
>     erlang-bugs@REDACTED <mailto:erlang-bugs@REDACTED>
>     http://erlang.org/mailman/listinfo/erlang-bugs
>
>
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED <mailto:erlang-bugs@REDACTED>
> http://erlang.org/mailman/listinfo/erlang-bugs
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140221/9d86a5d5/attachment.htm>


More information about the erlang-bugs mailing list