Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode support #12

Open
elbrujohalcon opened this issue Jun 18, 2012 · 0 comments
Open

Unicode support #12

elbrujohalcon opened this issue Jun 18, 2012 · 0 comments

Comments

@elbrujohalcon
Copy link

I would like to be able to do the following…

> UnicodeChars = "ぬるを 我が".
[12396,12427,12434,32,25105,12364]
> erldis:set(Redis, <<"key">>, UnicodeChars).
** exception error: bad argument
     in function  list_to_binary/1
        called as list_to_binary([12396,12427,12434,32,25105,12364])
     in call from erldis_binaries:to_binary/1 (src/erldis_binaries.erl, line 5)
     in call from erldis_proto:'-multibulk_cmd/1-lc$^0/1-0-'/1 (src/erldis_proto.erl, line 18)
     in call from erldis_proto:'-multibulk_cmd/1-lc$^0/1-0-'/1 (src/erldis_proto.erl, line 18)
     in call from erldis_proto:multibulk_cmd/1 (src/erldis_proto.erl, line 18)
     in call from erldis_client:scall/3 (src/erldis_client.erl, line 65)
     in call from erldis_client:sr_scall/2 (src/erldis_client.erl, line 55)

…whitout the need to do it as follows…

> UnicodeChars2 = unicode:characters_to_binary(UnicodeChars).
<<227,129,172,227,130,139,227,130,146,32,230,136,145,227,
  129,140>>
> erldis:set(Redis, <<"key">>, UnicodeChars2).               
ok

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant