[issue14929] IDLE crashes on *Edit / Find in files ...* command

Roger Serwy report at bugs.python.org
Mon May 28 00:27:47 CEST 2012


Roger Serwy <roger.serwy at gmail.com> added the comment:

The GrepDialog opens a file using plain "open", without specifying the encoding or how to handle errors. The docs for "open" says that "the default encoding is platform dependent (whatever locale.getpreferredencoding() returns)..." This can be problematic, as files can have different encodings and GrepDialog at present has no way to detect file encodings.

Attached is a preliminary patch to replace code points if the default decoder encounters errors.

----------
keywords: +patch
Added file: http://bugs.python.org/file25740/prelim_14929.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14929>
_______________________________________


More information about the Python-bugs-list mailing list