在启动Redis客户端如下加入参数输入可解决:
[root@hadoop7 redis]# ./bin/redis-cli --raw
这里要注意--raw有两个“-”号
为什么在后面加上--raw就行了呢?
官方文档是这样说的:
This time (integer)
was omitted from the output since the CLI detected the output was no longer written to the terminal. You can force raw output even on the terminal with the --raw
option:
意思就是说,加上--raw之后就可以在终端上强制原始输出,也就是将中文输出而不是输出的是一串utf-8编码字符串。