<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Le 17/09/11 01:28, Ian Kelly a écrit :
<blockquote
cite="mid:CALwzidnKQJF_mafYYDBezzUkKRwV8k+KTeuG1=fPiK6SMN=z_Q@mail.gmail.com"
type="cite">
<pre wrap="">On Fri, Sep 16, 2011 at 7:52 AM, Vincent Vande Vyvre
<a class="moz-txt-link-rfc2396E" href="mailto:vincent.vandevyvre@swing.be"><vincent.vandevyvre@swing.be></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">[vincent@myhost ~]$ python string_2.py
Python version: 3.2.2
<a class="moz-txt-link-abbreviated" href="mailto:Linux-3.0-ARCH-x86_64-Pentium-R-_Dual-Core_CPU_T4500_@_2.30GHz-with-glibc2.2.5">Linux-3.0-ARCH-x86_64-Pentium-R-_Dual-Core_CPU_T4500_@_2.30GHz-with-glibc2.2.5</a>
Path: /home/vincent/image.jpg, Type: <class 'str'>
File exists
Traceback (most recent call last):
File "string_2.py", line 13, in <module>
print('\nPath: {0}, Type: {1}'.format(path, type(path)))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 21-25:
ordinal not in range(128)
</pre>
</blockquote>
<pre wrap="">
This looks like a terminal encoding issue on the second PC. Your
terminal is probably not using a unicode encoding, and so it is unable
to print a unicode string.
Cheers,
Ian
</pre>
</blockquote>
Ok, my example is in a terminal but the problem is the same in a
graphical application wich use PyQt<br>
<br>
<div class="moz-signature">-- <br>
Vincent V.V.<br>
<a href="https://launchpad.net/oqapy">Oqapy</a> . <a
href="https://launchpad.net/qarte+7">Qarte+7</a> . <a
href="https://launchpad.net/paqager">PaQager</a></div>
</body>
</html>