Redis Chinese garbage problem solving

Add to start the client when the option to --raw

wangyulong@code-local:~$ redis-cli
127.0.0.1:6379> set key1 '上海'
OK
127.0.0.1:6379> get key1
"\xe4\xb8\x8a\xe6\xb5\xb7"
127.0.0.1:6379> 
wangyulong@code-local:~$ redis-cli --raw
127.0.0.1:6379> get key1
上海
127.0.0.1:6379> 

  

 

Guess you like

Origin www.cnblogs.com/yulongcode/p/11199167.html