redis set中文value
127.0.0.1:6379> set name 张三
再取出来,显示的utf-8编码的字符,而并非中文。
127.0.0.1:6379> get name
"\xe5\xbc\xa0\xe4\xb8\x89"
如何让他显示出中文张三呢。
很简单,只需要在进入时,加上“–raw”,如下:
redis-cli --raw
然后再获取就是中文了。
127.0.0.1:6379> get name
张三
redis set中文value
127.0.0.1:6379> set name 张三
再取出来,显示的utf-8编码的字符,而并非中文。
127.0.0.1:6379> get name
"\xe5\xbc\xa0\xe4\xb8\x89"
如何让他显示出中文张三呢。
很简单,只需要在进入时,加上“–raw”,如下:
redis-cli --raw
然后再获取就是中文了。
127.0.0.1:6379> get name
张三