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

nickel chen <>
Fri Apr 18 10:43:34 CEST 2014


It was confirmed to be a compability issue with R17.  
This is the related ejabberd github issue: https://github.com/processone/ejabberd/issues/164
 
   processone/ejabberd
Maybe i'm missing something, I'm having problems with translate module. After compiling and installing ejabberd from source, I wanted to start it sudo ejabberdc...  
在 github.com 上查看 预览者 Yahoo  

By now, it has been fixed by ejabberd team.
processone/ejabberd

 
   processone/ejabberd
ejabberd - Robust and scalable Jabber / XMPP Instant Messaging platform  
在 github.com 上查看 预览者 Yahoo  
processone/ejabberd

 
   processone/ejabberd
ejabberd - Robust and scalable Jabber / XMPP Instant Messaging platform  
在 github.com 上查看 预览者 Yahoo  



Dániel Szoboszlay <> 于 2014年4月14日, 星期一, 9:13 下午 写道:
 
Hi,

I’m not really familiar with ejabberd in particular, but I can think of two possible ways to fix your problem:
	* change the iolist_to_binary call to uncidoe:characters_to_binary, which will take care of utf8 encoding the unicode code points
	* change the translation file (el.msg) to contain the translations as binaries instead of strings (<<“…”/utf8>>)

I’d prefer the first solution, btw.

Regards,
Daniel


On 2014 Apr 11, at 8:41 , nickel chen <> wrote:

anyone information,  please? i'm stucked at this problem.
>nickel chen <> 于 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!
>
>_______________________________________________
>erlang-questions mailing list
>
>http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140418/9e615699/attachment.html>


More information about the erlang-questions mailing list