[pywin32-checkins] pywin32/Pythonwin/pywin/framework/editor document.py, 1.13, 1.14
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2010-05-06 16:30:11
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/editor In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv11084 Modified Files: document.py Log Message: Bug #2986020 - Attempt to encode script contents before opening file Index: document.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/editor/document.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** document.py 5 Jan 2009 11:09:20 -0000 1.13 --- document.py 6 May 2010 16:30:03 -0000 1.14 *************** *** 79,82 **** --- 79,88 ---- win32ui.MessageBox("Error - could not save file\r\n\r\n%s"%details) return 0 + except UnicodeEncodeError, details: + win32ui.MessageBox("Encoding failed: \r\n%s"%details + + '\r\nPlease add desired source encoding as first line of file, eg \r\n' + + '# -*- coding: mbcs -*-', + "File save failed") + return 0 self.SetModifiedFlag(0) # No longer dirty self.bDeclinedReload = 0 # They probably want to know if it changes again! |