[erlang-questions] 回复: 回复: ejabberd translate crash

nickel chen nickelchen@REDACTED
Mon Apr 14 03:26:51 CEST 2014


Yep. I was using R17.  After switching to R16, everything works fine.
alamo <ykh107@REDACTED> 于 2014年4月13日, 星期日, 8:41 下午 写道:
 
Compile with R16B03

On Thursday, 10 April 2014 23:41:46 UTC-7, nickel chen  wrote:
anyone information,  please? i'm stucked at this problem.
>nickel chen <nicke...@REDACTED> 于 2014年4月10日, 星期四, 3:24 下午 写道:
>
>
> Hi all, I'm new to erlang and I'm learning the code of ejabberd 13.12, I already have ejabberd installed, then start it with
>
>
>sudo ejabberdctl start
>
>
>There is a crash message in /var/log/ejabberd.log
>
>
>2014-04-10 14:37:56.520 [info] <0.7.0> Application ejabberd exited with reason: bad argument in call to erlang:iolist_to_binary([916, 953,945,956,972,961,966,969, 963,951,32,928,961,972,963, 946,945,963,951,962]) in translate:'-load_file/2-fun-2- '/3 line 91
>
>
>i added some debug info to the source code ` translate.erl`  and recompile ejabberd. then start it again, below is the debug message:
>
>
>
>2014-04-10 14:37:56.517 [info] <0.38.0>@translate:load_file: 87 File is: <<"//lib/ejabberd/priv/msgs/ el.msg">>, Orig is:"Access Configuration", Trans is: [916,953,945,956,972,961,966, 969,963,951,32,928,961,972, 963,946,945,963,951,962]
>
>
>well it's clear that there are unicode characters in I18N translation , when passed to the erlang:iolist_to_ binary/1, it crashed with badarg, because iolist only accepts byte( ) binary( ) and other iolist( )
>
>
>9> erlang:iolist_to_binary([256]) .
>** exception error: bad argument
>     in function  iolist_to_binary/1
>        called as iolist_to_binary([256])
>10> erlang:iolist_to_binary([255]) .
><<"ÿ">>
>11> 
>
>
>My question is simple, how to get around with this problem and get ejabberd launched?
>
>
>Thanks in advance!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140413/332d50c1/attachment.htm>


More information about the erlang-questions mailing list