<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 21, 2014 at 5:25 PM, Andreas Schumacher <span dir="ltr"><<a href="mailto:andreas@erlang.org" target="_blank">andreas@erlang.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
As Steve pointed out, bug.erl was encoded as ISO-8559-1/Latin-1 and
not as UTF-8.<br>
<br>
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:<br>
<br>
$ iconv -f ISO-8859-1 -t UTF-8 bug.erl -o bug.erl<br></div></blockquote><div><br></div><div>Thanks - The source came from erlide_scan.erl that I had somewhere.</div><div><br></div><div>I recently downloaded erlguten from git hub and ran into this problem.</div>
<div><br></div><div>I think this is going to hit a lot of legacy code.</div><div><br></div><div>Would it possible to recompile with the old compiler /scanner if this error is seen.</div><div>It's not nice to find you can't recompile ten year old code ...</div>
<div><br></div><div>Thanks anyway</div><div><br></div><div>/Joe</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
<br>
Andreas<br>
<div><br>
</div>
<blockquote type="cite">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
<a href="mailto:erlang-bugs-bounces@erlang.org" target="_blank">erlang-bugs-bounces@erlang.org</a>
[<a href="mailto:erlang-bugs-bounces@erlang.org" target="_blank">mailto:erlang-bugs-bounces@erlang.org</a>]
<b>On Behalf Of </b>Steve Vinoski<br>
<b>Sent:</b> den 21 februari 2014 16:38<br>
<b>To:</b> Vlad Dumitrescu<br>
<b>Cc:</b> erlang-bugs<br>
<b>Subject:</b> Re: [erlang-bugs] Bug in Erlang/OTP 17
[RELEASE CANDIDATE 1]<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Agreed. On OS X:<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">$ file -I bug.erl<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">bug.erl: text/plain;
charset=iso-8859-1<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Adding %% -*- coding: utf-8 -*- to the
top of the file causes the file to be saved as UTF-8:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">$ file -I bug.erl<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">bug.erl: text/plain; charset=utf-8<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">and after that, the compiler -- or more
specifically, the file_io_server -- is happy again.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">--steve<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Fri, Feb 21, 2014 at 10:29 AM, Vlad
Dumitrescu <<a href="mailto:vladdu55@gmail.com" target="_blank">vladdu55@gmail.com</a>>
wrote:<u></u><u></u></p>
<div>
<p class="MsoNormal">Hi Joe,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">regards,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Vlad<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">On Fri, Feb 21, 2014 at 2:07
PM, Joe Armstrong <<a href="mailto:joearms@gmail.com" target="_blank">joearms@gmail.com</a>>
wrote:<u></u><u></u></p>
</div>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<div>
<p class="MsoNormal">I can't compile files with
UFT characters in R17<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">With R17 [RELEASE
CANDIDATE 1] <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">$ erlc bug.erl <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">bug.erl:8: cannot parse
file, giving up<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">bug.erl:8: no module
definition<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">bug.erl:8: cannot
translate from UTF-8<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">With R16B<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">joe:paradis-master joe$
~/nobackup/otp_src_R16B/bin/erlc bug.erl <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Cheers<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888">/Joe<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">_______________________________________________<br>
erlang-bugs mailing list<br>
<a href="mailto:erlang-bugs@erlang.org" target="_blank">erlang-bugs@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-bugs" target="_blank">http://erlang.org/mailman/listinfo/erlang-bugs</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
erlang-bugs mailing list<br>
<a href="mailto:erlang-bugs@erlang.org" target="_blank">erlang-bugs@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-bugs" target="_blank">http://erlang.org/mailman/listinfo/erlang-bugs</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</blockquote>
<br>
</div>
</blockquote></div><br></div></div>