You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering encoding problems when opening IFC files.
Problems were not detected at the time of reading but prevent some treatments afterward:
(I've put the few errors in a sample_wall.ifc as an attachment) simple_wall.zip
ifc_file = ifcopenshell.open("/home/simple_wall.ifc")
ifc_file[4]
File "ifcopenshell_tools/ifcopenshell/entity_instance.py", line 164, in __repr__.
return repr(self.wrapped_data)
File "ifcopenshell_tools/ifcopenshell/ifcopenshell_wrapper.py", line 1659, in __repr__.
return _ifcopenshell_wrapper.entity_instance___repr__(self)
RuntimeError: wstring_convert::to_by
For the moment, these blocking problems concern 3 characters :
- "°": I added it on the IfcWall instance n° 45
- "Ø": I added it on the IfcPerson instance n° 4
- "é": I added it on the IfcWindow instance n° 124
This error is then found with IfcConvert (IfcOpenShell IfcConvert 0.6.0b0 (OCC 7.3.0)) :
...
terminate called after throwing an instance of 'std::range_error'.
what(): wstring_convert::to_bytes
Do you have an idea of how to solve/counteract the problem?
Thank you
The text was updated successfully, but these errors were encountered:
It's not valid in IFC(-SPF) to have character bytes above 0x7e. It's strictly ASCII. It needs to be encoded in a special way using code pages or \X2 / \X4 for unicode, see below:
Hi,
I'm encountering encoding problems when opening IFC files.
Problems were not detected at the time of reading but prevent some treatments afterward:
(I've put the few errors in a sample_wall.ifc as an attachment)
simple_wall.zip
For the moment, these blocking problems concern 3 characters :
- "°": I added it on the IfcWall instance n° 45
- "Ø": I added it on the IfcPerson instance n° 4
- "é": I added it on the IfcWindow instance n° 124
This error is then found with IfcConvert (IfcOpenShell IfcConvert 0.6.0b0 (OCC 7.3.0)) :
Do you have an idea of how to solve/counteract the problem?
Thank you
The text was updated successfully, but these errors were encountered: