[erlang-questions] [ANN] Erlang/OTP 17.0-rc1 has been released.

Loïc Hoguin essen@REDACTED
Sat Feb 1 12:48:27 CET 2014


Files are utf-8 by default now, you gotta add the following comment at 
the top of the files that require latin-1 to make them work like before.

%% -*- coding: latin-1 -*-

On 02/01/2014 12:11 PM, Max Lapshin wrote:
> The same problem with lager.erl:
>
>              {"don't choke on latin-1",
>                  fun() ->
>                          %% XXX if this test fails, check that this file
> is encoded latin-1, not utf-8!
>                          gen_event:add_handler(lager_event,
> lager_file_backend, [{"test.log", info}, {lager_default_formatter}]),
>                          lager:log(error, self(),"~ts", ["LÆÝÎN-ï"]),
>                          {ok, Bin} = file:read_file("test.log"),
>                          Pid = pid_to_list(self()),
>                          Res = re:split(Bin, " ", [{return, list},
> {parts, 5}]),
>                          ?assertMatch([_, _, "[error]", Pid,
>   [76,195,134,195,157,195,142,78,45,195,175,$\n]], Res)
>                  end
>              },
>
> Line
>
>                        lager:log(error, self(),"~ts", ["LÆÝÎN-ï"]),
>
> cannot even compile
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>

-- 
Loïc Hoguin
http://ninenines.eu



More information about the erlang-questions mailing list