[erlang-questions] io:format error with UTF-8 encoding binary

Vlad Dumitrescu vladdu55@REDACTED
Wed May 16 10:57:38 CEST 2007


Hi,

It works for me just fine on Windows.

regards,
Vlad

On 5/16/07, Caoyuan <dcaoyuan@REDACTED> wrote:
> Hi,
>
> Did somebody else encounter error when io:format(~p~n, [Bin]) where
> Bin is a binary with UTF-8 encoding string?
>
> I encountered this error several times, to reproduce it, please try
> attached text file:
> > erl
> 1> {ok, Bin} = file:read_file("6.txt").
> 2> io:format("Content: ~p~n", [Bin]).
>
> Then erl shell will hang, without any error message printed out. And
> also, the Bin could not be inserted into MYSQL blob field too.
>
> The lasted three bytes of 6.txt is <<226,128,156>>. If I remove these
> 3 bytes, everything works fine.
>
> My environment is Windows XP. the OTP is otp_win32_R11B-4
>
> Thanks.
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
>
>



More information about the erlang-questions mailing list