--- a/opster.py Mon Nov 01 17:44:08 2010 +0100
+++ b/opster.py Tue Nov 02 13:26:42 2010 +0100
@@ -13,15 +13,14 @@
try:
import locale
ENCODING = locale.getpreferredencoding()
- if not ENCODING or ENCODING == 'mac-roman':
- ENCODING = 'utf-8'
+ if not ENCODING or ENCODING == 'mac-roman' or 'ascii' in ENCODING.lower():
+ ENCODING = 'UTF-8'
except locale.Error:
- ENCODING = 'utf-8'
+ ENCODING = 'UTF-8'
def write(text, out=sys.stdout):
- encoding = locale.getpreferredencoding()
if isinstance(text, unicode):
- return out.write(text.encode(encoding))
+ return out.write(text.encode(ENCODING))
out.write(text)
def err(text):
--- a/runtests Mon Nov 01 17:44:08 2010 +0100
+++ b/runtests Tue Nov 02 13:26:42 2010 +0100
@@ -1,4 +1,4 @@
#!/bin/sh
cd tests
-cram -E *
+cram *