Alex Rivera | Logout

Accents stored in Redis not being readable

Asked 2011-07-18T10:19:15.080
22

Working with Redis 2.10 using redis-cli on Linux, I am faced with a problem regarding accents.

If I execute the command :

set "string" "à"

I get \xc3\xa0, it seems each converted accent begin with \xc3.

How do I get my original string back?

Edit
Report

3 Answers

39

Try using

redis-cli --raw

It solved problem for me.

answered 2013-06-06T16:01:07.383
9

"\xc3\xa0" is just Unicode "à" in UTF-8 encoding. Just decode the string and you're done...

answered 2012-04-24T18:14:20.933
0

You need to spec the version of Redis and more importantly the client you are using.

If you are using a telnet client, the problem may be your client. Redis supports arbitrary bytes for values and UTF-8 is not a problem at all (if your client is properly converting the entered glyphs to the associated byte sequence.)

answered 2011-07-20T00:22:54.867

Your Answer