Le 14/08/2014 14:35, marc.vanhoomis...@gmail.com a écrit :
Hello,

This very simple program runs well on windows 7

# -*- utf8 -*-
print('Réussi')

But, when I start the vrey same file on Linux (ubuntu 14), I got:

Traceback (most recent call last):
   File "/partages/bureau/PB/Dev/Python3/test.py", line 2, in <module>
     print('R\xe9ussi')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 1: 
ordinal not in range(128)

What should i do to let the same program run on both OS, without changes?

Thank you for your answer

Marc Vanhoomissen
No problem on Ubuntu

Python 3.2.3 (default, Feb 27 2014, 21:33:50)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Réussi")
Réussi

Are you really using Python 3 ?

$ python3 test.py
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to