Unicode String problem

Steve Vinoski steve at basho.com
Mon Mar 5 08:02:20 EST 2012

On Sun, Mar 4, 2012 at 4:51 PM, Buri Arslon <buriwoy at gmail.com> wrote:

> Hi everybody!
> I can't put unicode string to riak. I was following the riak-erlang-client
> docs, and this doesn't work:
>   Object = riakc_obj:new(<<"snippet">>, <<"odam">>, <<"Одамлардан тинглаб
> хикоя">>).
>  ** exception error: bad argument
> I googled but couldn't find anything meaningful about this issue. So, I'd
> be very grateful if someone could refer me
> to relevant documentation or give me some hints to solve the problem.

Have a look at the Erlang unicode module:


You probably need to use unicode:characters_to_binary to generate a valid
binary for the value you're trying to store in riak.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20120305/c6bbdc3c/attachment.html>

More information about the riak-users mailing list