diff --git a/invesalius/reader/dicom.py b/invesalius/reader/dicom.py index 0fc9e8d..45243ea 100644 --- a/invesalius/reader/dicom.py +++ b/invesalius/reader/dicom.py @@ -1926,12 +1926,7 @@ class Image(object): self.number = parser.GetImageNumber() self.spacing = spacing = parser.GetPixelSpacing() self.orientation_label = parser.GetImageOrientationLabel() - - if (sys.platform == 'win32'): - self.file = parser.filename.encode(utils.get_system_encoding()) - else: - self.file = parser.filename.encode('utf-8') - + self.file = parser.filename self.time = parser.GetImageTime() self.type = parser.GetImageType() self.size = (parser.GetDimensionX(), parser.GetDimensionY()) diff --git a/invesalius/utils.py b/invesalius/utils.py index baab670..5b1d92a 100755 --- a/invesalius/utils.py +++ b/invesalius/utils.py @@ -254,4 +254,7 @@ def get_physical_memory(): def get_system_encoding(): - return locale.getdefaultlocale()[1] + if (sys.platform == 'win32'): + return locale.getdefaultlocale()[1] + else: + return 'utf-8' -- libgit2 0.21.2