Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '+0100,': 0.07; 'bytes.': 0.07; 'terry': 0.07; 'python': 0.08; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'pm,': 0.10; 'wrote:': 0.14; 'opposite': 0.16; 'reedy': 0.16; 'then?': 0.16; 'jan': 0.20; 'header:In-Reply-To:1': 0.21; 'subject:problem': 0.22; 'thu,': 0.22; 'byte': 0.25; 'characters,': 0.30; "can't": 0.32; 'header:X -Complaints-To:1': 0.32; 'to:addr:python-list': 0.33; 'people,': 0.33; 'file': 0.34; 'characters': 0.34; 'nobody': 0.34; 'header :User-Agent:1': 0.35; 'received:org': 0.38; 'subject:: ': 0.38; 'should': 0.39; 'header:Mime-Version:1': 0.39; 'to:addr:python.org': 0.39; 'care': 0.72; '22:14:17': 0.84; 'computers.': 0.84; 'ascii.': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: the stupid encoding problem to stdout Date: Thu, 09 Jun 2011 20:14:26 -0400 References: <4df02e04$0$1779$a729d347@news.telepac.pt> <4df137a7$0$30580$a729d347@news.telepac.pt> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Gmane-NNTP-Posting-Host: rain.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1307664879 news.xs4all.nl 49048 [::ffff:82.94.164.166]:41289 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7333 On 6/9/2011 5:46 PM, Nobody wrote: > On Thu, 09 Jun 2011 22:14:17 +0100, S=C3=A9rgio Monteiro Basto wrote: > >> Exactly the opposite , if python don't know the encoding should not tr= y >> decode to ASCII. > > What should it decode to, then? > > You can't write characters to a stream, only bytes. > >> I want python don't care about encoding terminal and send characters a= s they >> are or for a file . > > You can't write characters to a stream, only bytes. Characters, representations are for people, byte representations are for = computers. --=20 Terry Jan Reedy