utf8 decode console outputs
authorpk910 <philipp@zoelle1.de>
Thu, 28 Jul 2011 08:18:02 +0000 (10:18 +0200)
committerpk910 <philipp@zoelle1.de>
Thu, 28 Jul 2011 08:18:02 +0000 (10:18 +0200)
Uplink/Client.class.php

index 1c3f778189cc69ad91f9394fc8e67f0f827b3f5c..af666cea3d1da4fc346be5902c2b21a7dd9121f5 100644 (file)
@@ -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);
        }