windows: by sqlcoder, fixes importing files with greek characters
This commit is contained in:
parent
c3077d5d66
commit
1d571cabee
|
@ -152,7 +152,7 @@ class Importer:
|
||||||
#Add an individual file to filelist
|
#Add an individual file to filelist
|
||||||
def addImportFile(self, filename, site = "default", filter = "passthrough"):
|
def addImportFile(self, filename, site = "default", filter = "passthrough"):
|
||||||
#TODO: test it is a valid file -> put that in config!!
|
#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
|
return
|
||||||
self.filelist[filename] = [site] + [filter]
|
self.filelist[filename] = [site] + [filter]
|
||||||
if site not in self.siteIds:
|
if site not in self.siteIds:
|
||||||
|
@ -406,7 +406,7 @@ class Importer:
|
||||||
conv = None
|
conv = None
|
||||||
(stored, duplicates, partial, errors, ttime) = (0, 0, 0, 0, time())
|
(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
|
# Load filter, process file, pass returned filename to import_fpdb_file
|
||||||
if self.settings['threads'] > 0 and self.writeq is not None:
|
if self.settings['threads'] > 0 and self.writeq is not None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user