From fedd09d18cec4fc7eacc95a97d7fc393239733db Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sun, 2 Nov 2014 15:47:29 -0200 Subject: [PATCH] Arch: Provisorily implemented workaround for utf8 paths and ifcopenshell - issue #1795 --- src/Mod/Arch/importIFC.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index 3571a1b0cb..6330402595 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -138,6 +138,9 @@ def insert(filename,docname,skip=[]): global ifcfile # keeping global for debugging purposes ifcopenshell.clean() + if isinstance(filename,unicode): + import sys #workaround since ifcopenshell currently can't handle unicode filenames + filename = filename.encode(sys.getfilesystemencoding()) ifcfile = ifcopenshell.open(filename) shape_attributes = ifcopenshell.SEW_SHELLS if SEPARATE_OPENINGS: shape_attributes += ifcopenshell.DISABLE_OPENING_SUBTRACTIONS