projects
/
PHP-P10.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
55c45cc
)
utf8 decode console outputs
author
pk910
<philipp@zoelle1.de>
Thu, 28 Jul 2011 08:18:02 +0000
(10:18 +0200)
committer
pk910
<philipp@zoelle1.de>
Thu, 28 Jul 2011 08:18:02 +0000
(10:18 +0200)
Uplink/Client.class.php
patch
|
blob
|
history
diff --git
a/Uplink/Client.class.php
b/Uplink/Client.class.php
index 1c3f778189cc69ad91f9394fc8e67f0f827b3f5c..af666cea3d1da4fc346be5902c2b21a7dd9121f5 100644
(file)
--- 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)) {
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;
$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;
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);
}
$this->traffic['out'] += strlen($line);
fwrite($this->socket,$line.$newline);
}