Message5671
I think I found a workaround for this problem, or at least the following code prints the same correct results both on CPython 2.6 and Jython 2.5.1 on Ubuntu. Does anyone see problems in it or have some cleaner solution?
import sys
if sys.platform.startswith('java'):
def _to_unicode(arg):
return ''.join(unichr(ord(c)) for c in arg)
else:
def _to_unicode(arg):
return unicode(arg, sys.getfilesystemencoding())
args = [ _to_unicode(a) for a in sys.argv[1:] ]
for a in args:
print a |
|
Date |
User |
Action |
Args |
2010-04-11 21:58:46 | pekka.klarck | set | messageid: <1271023126.16.0.15113620202.issue1592@psf.upfronthosting.co.za> |
2010-04-11 21:58:46 | pekka.klarck | set | recipients:
+ pekka.klarck |
2010-04-11 21:58:46 | pekka.klarck | link | issue1592 messages |
2010-04-11 21:58:45 | pekka.klarck | create | |
|