I'd like to save Arabic characters like سلام
in a redis hash, like this:
HMSET arabicHash "سلام" 5
OK
But the result is not as intended:
127.0.0.1:6379> HGETALL arabicHash
1) "\xd8\xb3\xd9\x84\xd8\xa7\xd9\x85"
2) "5"
I'm wondering if there is a way to save سلام
directly inot redis set? And if not, how can I convert back "\xd8\xb3\xd9\x84\xd8\xa7\xd9\x85"
to human-readable charachters after being retrived?
Update: I've tested on my Ubuntu Bash terminal, but the result is not formatted correctly here. The screenshot:
Tested on try.redis.io ( it shows the redis output in utf-8 decode form )