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

Caoyuan dcaoyuan@REDACTED
Wed May 16 13:55:47 CEST 2007


I'm just wondering if it depends on OS and OS's default Language
setting, my language setting is zh_CN. I tried again and again on my
machine, it hangs every time :-)

On 5/16/07, Vlad Dumitrescu <vladdu55@REDACTED> wrote:
> 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