redis 中文存储乱码问题

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

 

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

 

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

 

 
  1. redis> get test  
  2. "我们"  
posted @ 2014-05-15 16:22  hanframe  阅读(1124)  评论(0编辑  收藏  举报