Debugger choking on UTF-8 characters that it shouldn't take exception to

I am trying to use localized characters, and python3 with and without the pdb module works fine. When I use PyCharm, I get an error.

The code:

#/usr/bin/env python3

# -*- coding: iso-8859-1 -*-


The output:

/Library/Frameworks/Python.framework/Versions/3.2/bin/python3 /Applications/PyCharm --client --port 53316 --file /Users/jandahl/PycharmProjects/stringReplacement/

pydev debugger: starting

Connected to pydev debugger (build 107.576)

Traceback (most recent call last):

  File "/Applications/PyCharm", line 1203, in <module>['file'], None, None)

  File "/Applications/PyCharm", line 966, in run

    line = stream.readline() #Should not raise an exception even if there are no more contents

  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/encodings/", line 26, in decode

    return codecs.ascii_decode(input, self.errors)[0]

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 59: ordinal not in range(128)

I have a video demonstrating the difference in responses. You know, for kids.

I would not be completely surprised if I am doing something wrong, but I am certainly not sure of how that might be.

Please sign in to leave a comment.