From f55a7b373f665c2b489f436eab756a186c350888 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 4 Jan 2010 19:04:50 +0000 Subject: [PATCH] -Use utf-8 character set git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4885 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatd | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 8e9b772e8..dca5ff508 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -901,6 +901,8 @@ sub plugin_command { #pipe($pfd,$cfd); $parfd->autoflush(1); $pfd->autoflush(1); + binmode($parfd,':utf8'); + binmode($pfd,':utf8'); $child = xCAT::Utils->xfork; } else { $child = 0; @@ -1105,6 +1107,8 @@ sub dispatch_request { } $parfd->autoflush(1); $pfd->autoflush(1); + binmode($parfd,':utf8'); + binmode($pfd,':utf8'); $child = xCAT::Utils->xfork; if ($child) { $dispatch_children++; @@ -1241,7 +1245,8 @@ sub convey_response { } $resp = XMLout($resp,KeyAttr=>[], NoAttr=>1,RootName=>'xcatresponse'); #sanitize the response, to avoid being killed by non-printable bytes - $resp =~ tr/\011-\177/?/c; + #$resp =~ tr/\011-\177/?/c; + #seeing if using utf-8 offloads potential issues to client terminal print $parent_fd $resp; yield; #parent must get timeslice anyway before an ack could possibly return my $parsel = new IO::Select;