git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/branches/0.9.8.x@244 830e0280-6d2a-0410-9c65-932aecc39d9d
Michal Ludvig authored on 2008/11/05 13:02:14... | ... |
@@ -1,7 +1,9 @@ |
1 |
-2008-09-16 Michal Ludvig <michal@logix.cz> |
|
1 |
+2008-11-05 Michal Ludvig <michal@logix.cz> |
|
2 | 2 |
|
3 |
- * Released version 0.9.8.4 |
|
4 |
- ------------------------ |
|
3 |
+ * s3cmd: Unicode brainfuck again. This time force all output |
|
4 |
+ in UTF-8, will see how many complaints we'll get... |
|
5 |
+ |
|
6 |
+2008-09-16 Michal Ludvig <michal@logix.cz> |
|
5 | 7 |
|
6 | 8 |
* S3/PkgInfo.py: Bumped up version to 0.9.8.4 |
7 | 9 |
* NEWS: Added 0.9.8.4 |
... | ... |
@@ -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") |