New submission from Peter Boström <peterbost...@gmail.com>:

When reading from piped stdin, python has trouble decoding some special 
characters.

To reproduce, run the following command from cmd.exe:

  echo ü | C:\Python31\python.exe pycat.py

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 0: 
character maps to <undefined>

I've been able to reproduce this in a German version of Windows Vista, which I 
use at work. I detected this error when trying to pipe (and parse) output from 
the ping command, which contains non-simple characters. If I don't pipe and 
just type into the program, it works just fine, even with "strange" characters.

----------
components: Windows
files: pycat.py
messages: 112810
nosy: pbos
priority: normal
severity: normal
status: open
title: CharacterEncoderError when reading from sys.stdin from piped input in 
cmd.exe
versions: Python 3.1
Added file: http://bugs.python.org/file18385/pycat.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9511>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to