GNOME Bugzilla – Bug 660313
Handle coding declarations
Last modified: 2018-07-10 22:05:52 UTC
Moved from http://www.reinteract.org/trac/ticket/86 * On load, we should detect and honor coding declarations according to the Python rules. (Including the UTF-8 BOM. See PEP 0263, PEP 3120) If the coding declaration doesn't match the file contents, then the existing handling for utf-8 where we ask the user if they want to convert invalid byte sequences to escapes should work. * If there is no coding declaration, then use UTF-8 when loading the file * For libraries (not worksheets), with Python-2.x, if the file once loaded contains non-ascii, and has no coding declaration, prompt the user and offer to add a utf-8 coding declaration. (worth it? this is a definite corner case - might be encountered if someone is switching between Python 3.x and a 2.x version of Reinteract.) * On save, honor any coding declaration found. If converting to that encoding produces an error, offer the user to switch the coding declaration to UTF-8. (The two options are to cancel or switch the coding declaration... no third choice) * For libraries with Python-2.x, if the file contains non-ascii and there is no coding declaration, offer to add a utf-8 coding declaration. 04/08/09 04:42:23 changed by akaihola If a UTF-8 coding declaration can be automatically added when saving a library (bullet 5), I don't think the same is necessary when loading (bullet 3).
Reinteract is not under active development anymore and had its last code changes in early 2012: http://git.fishsoup.net/cgit/reinteract/log/ Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the responsibility for active development again.