From 84d72dd0c825ab71eb2647200245ebc5b5769ca7 Mon Sep 17 00:00:00 2001 From: kb Date: Sun, 3 Jul 2016 15:59:37 +0800 Subject: [PATCH] multiple byte characters support --- src/nsqphp/Wire/Reader.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/nsqphp/Wire/Reader.php b/src/nsqphp/Wire/Reader.php index 177938b..fdc6d35 100644 --- a/src/nsqphp/Wire/Reader.php +++ b/src/nsqphp/Wire/Reader.php @@ -192,9 +192,7 @@ private function readString(ConnectionInterface $connection, $size) $temp = unpack("c{$size}chars", $connection->read($size)); $out = ""; foreach($temp as $v) { - if ($v > 0) { - $out .= chr($v); - } + $out .= chr($v); } return $out; }