Commit 849cc868810add661a4185d9f4a4a5583528b6c7

Authored by Paulo Henrique Junqueira Amorim
1 parent 5007ecbb

FIX: Fix problem unicode

Showing 1 changed file with 5 additions and 1 deletions   Show diff stats
invesalius/reader/dicom_reader.py
... ... @@ -20,6 +20,7 @@ import os
20 20 import Queue
21 21 import threading
22 22 import tempfile
  23 +import sys
23 24  
24 25 from multiprocessing import cpu_count
25 26  
... ... @@ -90,7 +91,10 @@ class LoadDicom:#(threading.Thread):
90 91 def __init__(self, grouper, filepath):
91 92 #threading.Thread.__init__(self)
92 93 self.grouper = grouper
93   - self.filepath = filepath
  94 + if sys.platform == 'win32':
  95 + self.filepath = filepath.encode(utils.get_system_encode())
  96 + else:
  97 + self.filepath = filepath
94 98 self.run()
95 99  
96 100 def run(self):
... ...