[BUG] Get return wrong string when contains “\x”
arc130 opened this issue · 2 comments
arc130 commented
Hi,
when I get string contains "\x" (redis-cli return "0\x01"), the code
redis::OptionalString opt = redis.get("BM");
got wrong string "0\001"
.
it seems reply::parse dealing with problem. How to solve this problem?
sewenew commented
redis-plus-plus does not modified data returned from Redis. Instead, redis-cli modified binary data to show it in text mode by default. You can use redis-cli --raw get "BM"
to do a test (with --raw, Redis-cli does not modify your data). It should return different result from redis-cli get "BM"
.
Regards
arc130 commented
oh,my problem,thanks.