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


Groups > comp.lang.python > #76317

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!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python3': 0.07; 'encode': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; "subject:')": 0.09; 'python': 0.11; 'codec': 0.16; 'merely': 0.16; 'ordinal': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'subject:run': 0.16; 'subject:windows': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'command': 0.22; 'shell': 0.22; 'header:User-Agent:1': 0.23; 'environment': 0.24; 'header:X-Complaints-To:1': 0.27; 'idea': 0.28; 'character': 0.29; 'file': 0.32; '(most': 0.33; 'guess': 0.33; 'could': 0.34; 'problem': 0.35; "can't": 0.35; 'but': 0.35; 'really': 0.36; 'interact': 0.36; 'so,': 0.37; 'to:addr:python- list': 0.38; 'issue': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'received:org': 0.40; 'how': 0.40; 'skip:u 10': 0.60; 'email addr:gmail.com': 0.63; 'subjectcharset:utf-8': 0.72; 'actually,': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Peter Otten <__peter__@web.de>
Subject Re: Unable to run print('Réussi') on windows and on linux
Date Thu, 14 Aug 2014 18:00:56 +0200
Organization None
References <4dd67a80-b466-4866-ab67-d9a94c0b7ddf@googlegroups.com> <mailman.12996.1408023268.18130.python-list@python.org> <41563121-149d-401c-94ed-9c5c74e55ba3@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Gmane-NNTP-Posting-Host p57bdb44b.dip0.t-ipconnect.de
User-Agent KNode/4.13.2
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
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.13001.1408032080.18130.python-list@python.org> (permalink)
Lines 29
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1408032080 news.xs4all.nl 2877 [2001:888:2000:d::a6]:39689
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:76317

Show key headers only | View raw


marc.vanhoomissen@gmail.com wrote:

> Le jeudi 14 août 2014 15:22:52 UTC+2, Vincent Vande Vyvre a écrit :

>> Are you really using Python 3 ?

>> $ python3 test.py
> 
> Actually, when I try using a terminal, it works:
> $ python3 test.py
> Réussi
> 
> But when I issue the same command using webmin (v. 1.700 - shell command),
> I got:
>> python3 test.py
> Traceback (most recent call last):
>   File "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)
> 
> So, I guess it is merely a problem of webmin.

I have no idea how that might interact with webmin, but you could try to set 
the environment variable

PYTHONIOENCODING=utf-8

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