Latin-1 source code compatibility bug

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Latin-1 source code compatibility bug

Richard Carlsson-5
The attached file (originally an extract from Mochiweb) triggers the
following problem:

    erlc bar.erl
    /home/richardc/bar.erl:7: cannot parse file, giving up



        /Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140521/4d8fa668/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bar.erl
Type: application/octet-stream
Size: 120 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140521/4d8fa668/attachment.obj>

Reply | Threaded
Open this post in threaded view
|

Latin-1 source code compatibility bug

Anthony Ramine-2
Is that even supposed to work now that UTF-8 is the default?

--
Anthony Ramine

Le 21 mai 2014 ? 13:13, Richard Carlsson <carlsson.richard> a ?crit :

>
> The attached file (originally an extract from Mochiweb) triggers the following problem:
>
>     erlc bar.erl
>     /home/richardc/bar.erl:7: cannot parse file, giving up
>
>
>
>         /Richard
>
> <bar.erl>_______________________________________________
> erlang-bugs mailing list
> erlang-bugs
> http://erlang.org/mailman/listinfo/erlang-bugs


Reply | Threaded
Open this post in threaded view
|

Latin-1 source code compatibility bug

Magnus Henoch-3
Anthony Ramine <n.oxyde> writes:

> Is that even supposed to work now that UTF-8 is the default?

The README file for 17.0 says:

   OTP-11791  The default encoding for Erlang source files is now UTF-8. As
              a temporary measure to ease the transition from the old
              default of latin-1, if the compiler encounters byte sequences
              that are not valid UTF-8 sequences, the compiler will re-try
              the compilation in latin-1 mode. This workaround will be
              removed in a future release.

It seems like the compiler doesn't retry using latin-1 in this case.

(For the record, the file in question compiles without problems if you
put "%% -*- coding: latin-1 -*-" as the first line.)

Regards,
Magnus

Reply | Threaded
Open this post in threaded view
|

Latin-1 source code compatibility bug

Björn Gustavsson-3
In reply to this post by Richard Carlsson-5
On Wed, May 21, 2014 at 1:13 PM, Richard Carlsson
<carlsson.richard> wrote:
>
> The attached file (originally an extract from Mochiweb) triggers the
> following problem:
>
>     erlc bar.erl
>     /home/richardc/bar.erl:7: cannot parse file, giving up
>

Thanks for the bug report. I have just merged a fix to the
maint branch.

/Bjorn

--
Bj?rn Gustavsson, Erlang/OTP, Ericsson AB