From 1d571cabee94434aad96059b2e7f26d82e2f83ce Mon Sep 17 00:00:00 2001 From: steffen123 Date: Mon, 12 Jul 2010 18:04:30 +0200 Subject: [PATCH] windows: by sqlcoder, fixes importing files with greek characters --- pyfpdb/fpdb_import.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyfpdb/fpdb_import.py b/pyfpdb/fpdb_import.py index e8455c01..ac569c95 100755 --- a/pyfpdb/fpdb_import.py +++ b/pyfpdb/fpdb_import.py @@ -152,7 +152,7 @@ class Importer: #Add an individual file to filelist def addImportFile(self, filename, site = "default", filter = "passthrough"): #TODO: test it is a valid file -> put that in config!! - if filename in self.filelist or not os.path.exists(filename): + if filename in self.filelist or not os.path.exists(unicode(filename,'utf-8')): return self.filelist[filename] = [site] + [filter] if site not in self.siteIds: @@ -406,7 +406,7 @@ class Importer: conv = None (stored, duplicates, partial, errors, ttime) = (0, 0, 0, 0, time()) - file = file.decode(Configuration.LOCALE_ENCODING) + file = file.decode("utf-8") #(Configuration.LOCALE_ENCODING) # Load filter, process file, pass returned filename to import_fpdb_file if self.settings['threads'] > 0 and self.writeq is not None: