Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #76359
| X-Received | by 10.182.232.164 with SMTP id tp4mr8887588obc.29.1408090985413; Fri, 15 Aug 2014 01:23:05 -0700 (PDT) |
|---|---|
| X-Received | by 10.140.94.34 with SMTP id f31mr6903qge.11.1408090985386; Fri, 15 Aug 2014 01:23:05 -0700 (PDT) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!r2no100856igi.0!news-out.google.com!j6ni190qas.0!nntp.google.com!m5no24062qaj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.python |
| Date | Fri, 15 Aug 2014 01:23:05 -0700 (PDT) |
| In-Reply-To | <4dd67a80-b466-4866-ab67-d9a94c0b7ddf@googlegroups.com> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=2a02:120b:c3cc:5710:8143:71d1:fc04:a0a5; posting-account=ung4FAoAAAC46zhHJ0Nsnuox7M5gDvs_ |
| NNTP-Posting-Host | 2a02:120b:c3cc:5710:8143:71d1:fc04:a0a5 |
| References | <4dd67a80-b466-4866-ab67-d9a94c0b7ddf@googlegroups.com> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <ef036ddf-dddd-4ff9-93f4-df753240a5a3@googlegroups.com> (permalink) |
| Subject | Re: Unable to run print('Réussi') on windows and on linux |
| From | wxjmfauth@gmail.com |
| Injection-Date | Fri, 15 Aug 2014 08:23:05 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| X-Received-Bytes | 2127 |
| X-Received-Body-CRC | 2604615869 |
| Xref | csiph.com comp.lang.python:76359 |
Show key headers only | View raw
Le jeudi 14 août 2014 14:35:51 UTC+2, marc.van...@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
>
My guess.
Your created "utf-8" file may contain a "mark", wrongly called BOM,
and your *x toll is not handling it.
jmf
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll 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