Skip to content

Unicode support #12

@elbrujohalcon

Description

@elbrujohalcon

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions