1

removing utf encode on opening file

This commit is contained in:
Alex Yatskov 2011-10-13 07:34:04 -07:00
parent 84a23f7032
commit ffccd0e20d

View File

@ -322,7 +322,7 @@ class MainWindowReader(QtGui.QMainWindow, Ui_MainWindowReader):
def openFile(self, filename): def openFile(self, filename):
filename = unicode(filename) filename = unicode(filename)
try: try:
with open(filename.encode('utf-8'), 'rb') as fp: with open(filename, 'rb') as fp:
content = fp.read() content = fp.read()
except IOError: except IOError:
self.setStatus(u'Failed to load file {0}'.format(filename)) self.setStatus(u'Failed to load file {0}'.format(filename))