Skip to content

Commit

Permalink
Draft: Fixed encoding bug in dwg import - fixes #2872
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Jan 23, 2017
1 parent 1c0c848 commit 9f859a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Mod/Draft/importDWG.py
Expand Up @@ -100,6 +100,10 @@ def convertToDxf(dwgfilename):
basename = os.path.basename(dwgfilename)
cmdline = '"%s" "%s" "%s" "ACAD2000" "DXF" "0" "1" "%s"' % (teigha, indir, outdir, basename)
print("Converting: " + cmdline)
if isinstance(cmdline,unicode):
import sys
encoding = sys.getfilesystemencoding()
cmdline = cmdline.encode(encoding)
subprocess.call(cmdline, shell=True) #os.system(cmdline)
result = outdir + os.sep + os.path.splitext(basename)[0] + ".dxf"
if os.path.exists(result):
Expand Down

0 comments on commit 9f859a0

Please sign in to comment.