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


Groups > comp.lang.python > #62793

Re: unicode to human readable format

From Dave Angel <davea@davea.name>
Subject Re: unicode to human readable format
Date 2013-12-27 06:59 -0500
References <f6f3d6e9-d0f5-4c06-8f15-42aabf149473@googlegroups.com> <7f0f59ef-5a9e-4c6b-832a-dfaee3ee4dcf@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.4664.1388145522.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, 27 Dec 2013 02:43:58 -0800 (PST), tomasz.kaczorek@gmail.com 
wrote:
> 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?

First, what version of what os, and what version of python? 

Next,  what terminal are you running,  or what ide, and do you have 
stdout redirected? 

Finally what does your program look like, or at least tell us the 
type and represents of s [0].

Bottom line is that s [0] contains a code point that's larger than 7f 
and print is convinced that your terminal can handle only ASCII.

-- 
DaveA

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


Thread

unicode to human readable format tomasz.kaczorek@gmail.com - 2013-12-22 04:24 -0800
  Re: unicode to human readable format Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-12-22 13:30 +0100
  Re: unicode to human readable format Peter Otten <__peter__@web.de> - 2013-12-22 13:33 +0100
  Re: unicode to human readable format tomasz.kaczorek@gmail.com - 2013-12-27 02:43 -0800
    Re: unicode to human readable format Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-27 22:37 +1100
      Re: unicode to human readable format wxjmfauth@gmail.com - 2013-12-27 23:48 -0800
    Re: unicode to human readable format Ned Batchelder <ned@nedbatchelder.com> - 2013-12-27 06:47 -0500
    Re: unicode to human readable format Dave Angel <davea@davea.name> - 2013-12-27 06:59 -0500

csiph-web