Ticket #1119: OWFile.py.patch

File OWFile.py.patch, 658 bytes (added by Dad, 2 years ago)

OWFile.py patch

  • OWFile.py

    old new class OWFile(OWWidget): 
    199199            else: 
    200200                startfile = self.recentFiles[0] 
    201201 
    202         filename = str(QFileDialog.getOpenFileName(self, 'Open Orange Data File', startfile, self.dlgFormats)) 
     202        openfilename = QFileDialog.getOpenFileName(self, 'Open Orange Data File', startfile, self.dlgFormats) 
     203 
     204        try: 
     205            filename = str(openfilename) 
     206        except UnicodeEncodeError: 
     207            filename = unicode(openfilename).encode('unicode_escape') 
    203208 
    204209        if filename == "": 
    205210            return