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

Joe Armstrong <>
Fri Feb 21 18:22:07 CET 2014


On Fri, Feb 21, 2014 at 5:25 PM, Andreas Schumacher <>wrote:

>  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
>

Thanks - The source came from erlide_scan.erl that I had somewhere.

I recently downloaded erlguten from git hub and ran into this problem.

I think this is going to hit a lot of legacy code.

Would it possible to recompile with the old compiler /scanner if this error
is seen.
It's not nice to find you can't recompile ten year old code ...

Thanks anyway

/Joe




>
> Andreas
>
>
>
>
>
> *From:*  [
> mailto: <>] *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 <>
> 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 <> 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
> 
> http://erlang.org/mailman/listinfo/erlang-bugs
>
>
>
>
> _______________________________________________
> erlang-bugs mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-bugs
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140221/94a2d9e3/attachment.html>


More information about the erlang-bugs mailing list