Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #76303

Re: Unable to run print('Réussi') on windows and on linux

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <vincent.vande.vyvre@telenet.be>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.007
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; '-*-': 0.07; 'python3': 0.07; 'encode': 0.09; 'runs': 0.10; 'python': 0.11; 'windows': 0.15; '(ubuntu': 0.16; 'codec': 0.16; 'from:name:vincent vande vyvre': 0.16; 'ordinal': 0.16; 'received:195.130': 0.16; 'received:195.130.137': 0.16; 'received:telenet-ops.be': 0.16; 'subject:run': 0.16; 'subject:windows': 0.16; 'utf8': 0.16; '\xe9crit': 0.16; 'feb': 0.22; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'skip:" 40': 0.26; 'header:In-Reply-To:1': 0.27; 'character': 0.29; 'marc': 0.31; 'os,': 0.31; 'file': 0.32; 'run': 0.32; 'linux': 0.33; '(most': 0.33; 'problem': 0.35; "can't": 0.35; 'really': 0.36; 'ubuntu': 0.36; 'should': 0.36; 'thank': 0.38; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60; 'simple': 0.61; 'email addr:gmail.com': 0.63; 'more': 0.64; 'charset:windows-1252': 0.65; 'header:Reply-To:1': 0.67; 'reply- to:no real name:2**0': 0.71; '2014,': 0.84
Date Thu, 14 Aug 2014 15:22:52 +0200
From Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Unable to run print('Réussi') on windows and on linux
References <4dd67a80-b466-4866-ab67-d9a94c0b7ddf@googlegroups.com>
In-Reply-To <4dd67a80-b466-4866-ab67-d9a94c0b7ddf@googlegroups.com>
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 8bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To vincent.vandevyvre@oqapy.eu
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.12996.1408023268.18130.python-list@python.org> (permalink)
Lines 31
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1408023268 news.xs4all.nl 2861 [2001:888:2000:d::a6]:49488
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:76303

Show key headers only | View raw


Le 14/08/2014 14:35, marc.vanhoomissen@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Unable to run print('Réussi') on windows and on linux marc.vanhoomissen@gmail.com - 2014-08-14 05:35 -0700
  Re: Unable to run print('Réussi') on windows and on linux YBM <ybmess@nooos.fr.invalid> - 2014-08-14 15:31 +0200
    Re: Unable to run print('Réussi') on windows and on linux marc.vanhoomissen@gmail.com - 2014-08-14 07:04 -0700
      Re: Unable to run print('Réussi') on windows and on linux Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-14 15:38 +0100
      Re: Unable to run print('Réussi') on windows and on linux YBM <ybmess@nooos.fr.invalid> - 2014-08-14 16:47 +0200
        Re: Unable to run print('Réussi') on windows and on linux Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-15 01:21 +1000
          Re: Unable to run print('Réussi') on windows and on linux Ian Kelly <ian.g.kelly@gmail.com> - 2014-08-14 10:12 -0600
          Re: Unable to run print('Réussi') on windows and on linux wxjmfauth@gmail.com - 2014-08-15 01:25 -0700
    Re: Unable to run print('Réussi') on windows and on linux Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> - 2014-08-14 16:46 +0200
  Re: Unable to run print('Réussi') on windows and on linux Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> - 2014-08-14 15:22 +0200
    Re: Unable to run print('Réussi') on windows and on linux marc.vanhoomissen@gmail.com - 2014-08-14 07:01 -0700
      Re: Unable to run print('Réussi') on windows and on linux Peter Otten <__peter__@web.de> - 2014-08-14 18:00 +0200
  Re: Unable to run print('Réussi') on windows and on linux Anssi Saari <as@sci.fi> - 2014-08-14 17:36 +0300
  Re: Unable to run print('Réussi') on windows and on linux wxjmfauth@gmail.com - 2014-08-15 01:23 -0700

csiph-web