This string:
line = '\tlong_plugin_output=\x88\\\\\x97\xe5\xff\x7f\\n'
.. When printed, produces the following output on my Macbook Pro:
>>> line = '\tlong_plugin_output=\x88\\\\\x97\xe5\xff\x7f\\n'
>>> line
'\tlong_plugin_output=\x88\\\\\x97åÿ\x7f\\n'
>>> print(line)
long_plugin_output=\\åÿ\n
.. But then it produces this error on my ubuntu server:
>>> line = '\tlong_plugin_output=\x88\\\\\x97\xe5\xff\x7f\\n'
>>> line
'\tlong_plugin_output=\x88\\\\\x97\xe5\xff\x7f\\n'
>>> print(line)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character '\x88' in position 20: ordinal not in range(128)
The python version I'm running on my macbook:
Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
$ uname -a Darwin MacBook-Pro.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
The python version I'm running on my Ubuntu server:
Python 3.2.3 (default, Sep 25 2013, 18:25:56) [GCC 4.6.3] on linux2
$ uname -a Linux net.local.net 3.2.2 #3 SMP Thu Jan 26 20:18:37 UTC 2012 i686 i686 i386 GNU/Linux
What could be causing the different behaviour on these platforms?