Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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; 'pycon': 0.01; 'encode': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'codec': 0.16; 'help?': 0.16; 'ordinal': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 's[0]': 0.16; 'subject:format': 0.16; 'subject:unicode': 0.16; 'unicode,': 0.16; 'wrote:': 0.18; 'print': 0.22; 'header:User-Agent:1': 0.23; 'please?': 0.24; 'received:comcast.net': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'characters': 0.30; "can't": 0.35; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'skip:u 10': 0.60; 'read': 0.60; 'solve': 0.60; 'email addr:gmail.com': 0.63 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ned Batchelder Subject: Re: unicode to human readable format Date: Fri, 27 Dec 2013 06:47:07 -0500 References: <7f0f59ef-5a9e-4c6b-832a-dfaee3ee4dcf@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: c-50-133-228-126.hsd1.ma.comcast.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <7f0f59ef-5a9e-4c6b-832a-dfaee3ee4dcf@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1388144838 news.xs4all.nl 2890 [2001:888:2000:d::a6]:55311 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62792 On 12/27/13 5:43 AM, tomasz.kaczorek@gmail.com wrote: > hello, > can I ask you for help? when I try to print s[0] i vane the message: UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128). > how to solve my problem, please? > > > regards, > t. > For help with the fundamentals, you can read or watch this PyCon presentation: Pragmatic Unicode, or, How Do I Stop the Pain? http://nedbatchelder.com/text/unipain.html -- Ned Batchelder, http://nedbatchelder.com