redis 中文存储乱码问题

在redis 中存储中文,读取会出现乱码(其实不是乱码,只是不是我们存的中文显示)

1 redis> set test "我们"  
2 OK  
3 redis> get test  
4 "\xe6\x88\x91\xe4\xbb\xac"  

如何在get时取到它的中文呢?只需要在redis-cli 后面加上 --raw

redis> get test
"我们"

 

 
posted @ 2014-04-21 12:08  siyed  Views(7240)  Comments(0Edit  收藏  举报