Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework
In directory sc8-pr-cvs1:/tmp/cvs-serv8419
Modified Files:
interact.py
Log Message:
Go 1/2 way to handling the Unicode error that sometimes comes up.
Index: interact.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/interact.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** interact.py 15 Apr 2002 15:15:37 -0000 1.13
--- interact.py 1 Dec 2003 11:06:42 -0000 1.14
***************
*** 304,308 ****
line = self.GetLine(line)
if pywin.is_platform_unicode:
! line = unicode(line, pywin.default_scintilla_encoding).encode(pywin.default_platform_encoding)
while line and line[-1] in ['\r', '\n']:
line = line[:-1]
--- 304,315 ----
line = self.GetLine(line)
if pywin.is_platform_unicode:
! try:
! line = unicode(line, pywin.default_scintilla_encoding).encode(pywin.default_platform_encoding)
! except:
! # We should fix the underlying problem rather than always masking errors
! # so make it complain.
! print "Unicode error converting", repr(line)
! line = unicode(line, pywin.default_scintilla_encoding, "ignore").encode(pywin.default_platform_encoding)
!
while line and line[-1] in ['\r', '\n']:
line = line[:-1]
|