View Issue Details

IDProjectCategoryView StatusLast Update
0001411FreeCADBugpublic2014-10-11 12:59
Reportershoogen Assigned Toshoogen  
PriorityhighSeveritymajorReproducibilityhave not tried
Status closedResolutionfixed 
OSMS Windows 
Product Version0.13 
Summary0001411: Importing and Exporting fails on Windows due to filepath encoding
DescriptionExporting using the ImportGui module works. While exporting using the Part module does not work.
http://forum.freecadweb.org/viewtopic.php?f=3&t=5673
Steps To Reproduce>>> Part.export([App.ActiveDocument.Box],"C:/Users/SomeUser/Desktop/folderwithnonasciicharsäöü/filenamedoesntmatter.stp")
>>> App.ActiveDocument.Box.Shape.exportBrep("C:/Users/SomeUser/Desktop/Ordnerä/dfdf.brep")
Traceback (most recent call last):
  File "<input>", line 1, in <module>
Exception: Writing of BREP failed
TagsNo tags attached.
FreeCAD Information

Relationships

related to 0001027 closedshoogen UTF-8 encoded PyString objects are used instead of unicode objects to pass unicode data to the python interpreter 
parent of 0001763 closedshoogen use UTF8 for filenames 
related to 0001421 closedshoogen STEP import failure due to non-ASCII chars path 
child of 0000812 closedshoogen Does not import files with the national chars in the file name. 

Activities

shoogen

2014-02-13 16:26

developer   ~0004213

http://stackoverflow.com/questions/821873/how-to-open-an-stdfstream-ofstream-or-ifstream-with-a-unicode-filename
vs.
https://github.com/tpaviot/oce/blob/master/src/BRepTools/BRepTools.cxx#L667
seems to be a upstream problem in OCCT

wmayer

2014-02-13 16:42

administrator   ~0004214

For the BRep file format we can basically support file path with non-ASCII characters because there is an overloaded version using C++ iostreams. However, this only works if OCC/OCE and FreeCAD are built with exactly the same compiler version otherwise the application crashes.

Unfortunately, this doesn't work for STEP or IGES because the API only accepts C-strings as argument.

wmayer

2014-02-14 14:27

administrator   ~0004220

http://tracker.dev.opencascade.org/view.php?id=22125
http://tracker.dev.opencascade.org/view.php?id=22484

shoogen

2014-03-12 17:07

developer   ~0004439

http://tracker.dev.opencascade.org/view.php?id=24716

shoogen

2014-07-12 16:00

developer   ~0004788

the fix to http://tracker.dev.opencascade.org/view.php?id=22484 fill break backwards compatibility. Therefore it needs to be taken into consideration when adapting to a newer OCCT version.

Issue History

Date Modified Username Field Change
2014-02-13 15:54 shoogen New Issue
2014-02-13 16:05 shoogen Steps to Reproduce Updated View Revisions
2014-02-13 16:09 shoogen Description Updated View Revisions
2014-02-13 16:09 shoogen Steps to Reproduce Updated View Revisions
2014-02-13 16:10 shoogen Summary Opening and Saving fails due to filepath encoding on windows => Importing and Exporting fails on Windows due to filepath encoding
2014-02-13 16:26 shoogen Note Added: 0004213
2014-02-13 16:34 shoogen Target Version 0.14 =>
2014-02-13 16:42 wmayer Note Added: 0004214
2014-02-14 14:27 wmayer Note Added: 0004220
2014-02-19 11:33 shoogen Relationship added related to 0001421
2014-03-11 01:44 yorik Relationship added child of 0000812
2014-03-12 17:07 shoogen Note Added: 0004439
2014-07-12 16:00 shoogen Note Added: 0004788
2014-07-12 16:00 shoogen Relationship added related to 0001573
2014-07-23 11:39 shoogen Relationship deleted related to 0001573
2014-09-24 11:32 shoogen Relationship added related to 0001027
2014-09-24 11:35 shoogen Assigned To => shoogen
2014-09-24 11:35 shoogen Status new => assigned
2014-09-24 11:41 shoogen Relationship added parent of 0001763
2014-10-11 12:41 shoogen Status assigned => closed
2014-10-11 12:41 shoogen Resolution open => fixed
2014-10-11 12:45 shoogen Status closed => feedback
2014-10-11 12:45 shoogen Resolution fixed => reopened
2014-10-11 12:59 shoogen Status feedback => closed
2014-10-11 12:59 shoogen Resolution reopened => fixed