unicode to human readable format

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Dec 27 06:37:17 EST 2013


tomasz.kaczorek at 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?

What version of Python?

What operating system?

What environment are you running in? IDLE? The shell or cmd.exe? Powershell?
xterm? Something else?

Please copy and paste the complete traceback, starting from the line

    Traceback (most recent call last):

to the end.

Please print repr(s[0]) and show us the output.


-- 
Steven




More information about the Python-list mailing list