From: pk910 Date: Thu, 28 Jul 2011 08:18:02 +0000 (+0200) Subject: utf8 decode console outputs X-Git-Url: http://git.pk910.de/?p=PHP-P10.git;a=commitdiff_plain;h=38efc960dd8b973b5475f53000cdbf3644d0017a utf8 decode console outputs --- diff --git a/Uplink/Client.class.php b/Uplink/Client.class.php index 1c3f778..af666ce 100644 --- a/Uplink/Client.class.php +++ b/Uplink/Client.class.php @@ -104,7 +104,7 @@ class Client { while(($line = @fgets($this->socket)) != null) { $line=trim($line); if(!empty($line)) { - echo"[recv] ".$line."\n"; + echo"[recv] ".utf8_decode($line)."\n"; $this->traffic['in'] += strlen($line); $lines[] = $line; if(count($lines) >= self::CLIENT_RECV_MAX_LINES) break; @@ -117,7 +117,7 @@ class Client { public function send($line, $newline = "\r\n") { if($this->socket == null) return; - echo"[send] ".$line."\n"; + echo"[send] ".utf8_decode($line)."\n"; $this->traffic['out'] += strlen($line); fwrite($this->socket,$line.$newline); }