From a91e6a8440922af30beb2a780f5931fa5535a433 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Thu, 21 Apr 2011 10:03:18 +0000 Subject: [PATCH] layout --- lib/core/common.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 8c2dc5f65..0cb503ace 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -613,16 +613,18 @@ def dataToStdout(data, forceOutput=False): # Reference: http://bugs.python.org/issue1602 if IS_WIN: output = data.encode('ascii', errors="replace") + if output != data: warnMsg = "cannot properly display Unicode characters " warnMsg += "inside Windows OS command prompt " - warnMsg += "(http://bugs.python.org/issue1602). all " + warnMsg += "(http://bugs.python.org/issue1602). All " warnMsg += "similar occurances will result in " - warnMsg += "replacement with '?' character. please, find " + warnMsg += "replacement with '?' character. Please, find " warnMsg += "proper character representation inside " warnMsg += "coresponding output files. " - warnMsg += "p.s. FORMAT C: /U is highly recommended" + warnMsg += "PS: FORMAT C: /U is highly recommended" singleTimeLogMessage(warnMsg, logging.WARN, 'dataToStdout') + sys.stdout.write(output) else: sys.stdout.write(data.encode(sys.stdout.encoding))