summaryrefslogtreecommitdiffstats
path: root/Lib/encodings/koi8_r.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2007-09-07 05:06:21 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2007-09-07 05:06:21 (GMT)
commit44fa8f650f3a69318afe37874e82c6688f88e311 (patch)
tree97c6429fe8eafeef30256becdd21a165f85e412f /Lib/encodings/koi8_r.py
parent504d8854176f1ee70ccb5784a2313575d420d519 (diff)
downloadcpython-44fa8f650f3a69318afe37874e82c6688f88e311.zip
cpython-44fa8f650f3a69318afe37874e82c6688f88e311.tar.gz
cpython-44fa8f650f3a69318afe37874e82c6688f88e311.tar.bz2
Make IDLE's file decode more robust.
1. coding_spec() only looks at first two lines of bytes to avoid a UnicodeDecodeError if rest of file is e.g. latin-1 2. coding_spec() handles \n or \r 3. Clarify that locale_encoding is used by calling it that. However, it's still called IOBinding.encoding in other parts of IDLE and that usage needs to be checked to verify that's still what is desired. 4. Return None from _decode() if decoding fails. 5. Name the vars representing bytes and strings or chars appropriately.
Diffstat (limited to 'Lib/encodings/koi8_r.py')
0 files changed, 0 insertions, 0 deletions