Browse code

Merge from 0.9.8.x branch, rel 244: * s3cmd: Unicode brainfuck again. This time force all output in UTF-8, will see how many complaints we'll get...

git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@253 830e0280-6d2a-0410-9c65-932aecc39d9d

Michal Ludvig authored on 2008/11/16 18:37:44
Showing 2 changed files
... ...
@@ -1,3 +1,9 @@
1
+2008-11-16  Michal Ludvig  <michal@logix.cz>
2
+
3
+	Merge from 0.9.8.x branch, rel 244:
4
+	* s3cmd: Unicode brainfuck again. This time force all output
5
+	  in UTF-8, will see how many complaints we'll get...
6
+
1 7
 2008-09-16  Michal Ludvig  <michal@logix.cz>
2 8
 
3 9
 	* NEWS: s3cmd 0.9.8.4 released from branches/0.9.8.x SVN branch.
... ...
@@ -22,10 +22,14 @@ from logging import debug, info, warning, error
22 22
 from distutils.spawn import find_executable
23 23
 
24 24
 ## Output native on TTY, UTF-8 otherwise (redirects)
25
-_stdout = sys.stdout.isatty() and sys.stdout or codecs.getwriter("utf-8")(sys.stdout)
26
-_stderr = sys.stderr.isatty() and sys.stderr or codecs.getwriter("utf-8")(sys.stderr)
27
-#_stdout = codecs.getwriter("utf-8")(sys.stdout)
28
-#_stderr = codecs.getwriter("utf-8")(sys.stderr)
25
+#_stdout = sys.stdout.isatty() and sys.stdout or codecs.getwriter("utf-8")(sys.stdout)
26
+#_stderr = sys.stderr.isatty() and sys.stderr or codecs.getwriter("utf-8")(sys.stderr)
27
+## Output UTF-8 in all cases
28
+_stdout = codecs.getwriter("utf-8")(sys.stdout)
29
+_stderr = codecs.getwriter("utf-8")(sys.stderr)
30
+## Leave it to the terminal
31
+#_stdout = sys.stdout
32
+#_stderr = sys.stderr
29 33
 
30 34
 def output(message):
31 35
 	_stdout.write(message + "\n")