i've made a script that reads an .ifc file. then adds a pset and properties( i dont make any changes to the original, just add). And writes a new .ifc file that is a copy of the original+the additions.
It works great until i get some utf-8 (or any spec char unicode)values.
it reads and decodes it fine: (from notepad++)
2921= IFCBUILDINGELEMENTPROXYTYPE('3QPADpsq71CHeCe7e3GDm5',#32,'D\X2\00F8\X0\r',$,$,$,$,'DA64A373-DB41-C131-1A0C-A07A0340DC05',$,.NOTDEFINED.);
prints: Dør
but when its writing the file the same element get a diff unicode:
2921=IFCBUILDINGELEMENTPROXYTYPE('3QPADpsq71CHeCe7e3GDm5',#32,'D\X4\000000F8\X0\r',$,$,$,$,'DA64A373-DB41-C131-1A0C-A07A0340DC05',$,.NOTDEFINED.);
and the file is unreadable by the ifc utilizing software (Solibri MC).
is there any way of making IfcOpenshell write it with the same unicode as it reads? or can i force what encoding it should use when writing?
i've made a script that reads an .ifc file. then adds a pset and properties( i dont make any changes to the original, just add). And writes a new .ifc file that is a copy of the original+the additions.
It works great until i get some utf-8 (or any spec char unicode)values.
it reads and decodes it fine: (from notepad++)
prints: Dør
but when its writing the file the same element get a diff unicode:
and the file is unreadable by the ifc utilizing software (Solibri MC).
is there any way of making IfcOpenshell write it with the same unicode as it reads? or can i force what encoding it should use when writing?