IFC offers a variety of string-based data types. For example,
IfcIdentifier. As a human, I would only expect things like line breaks to be accepted in
IfcText, and things like
IfcIdentifier should not. Yet, they both offer the exact same description:
NOTE The set of characters that may appear in STRINGs exchanged in the exchange structure as defined in ISO 10303.21 is provided in ISO 10646. The encoding of characters in case of file-based exchange is defined in ISO 10303-21 and ISO 10303-28. Among else, these specifications define the encoding of 8-bit characters from ISO 8859-1…-16 and of 2-byte and 4-byte Unicode characters from ISO 10646.
Here is an IfcWall with a tab and line break encoded in its name attribute:
For clarification - this question is about what set of characters should be allowed in the IFC string data types. Not about the capabilities of STEP-based encoding, which is irrelevant (but, really, really fun!)
As another example, we can name our walls after cat emojis. Nice.
>>> w #1=IfcWall($,$,'Miao 😸',$,$,$,$,$,$) >>> f.wrapped_data.to_string() "...#1=IFCWALL($,$,'Miao \\X4\\0001F638\\X0\\',$,$,$,$,$,$);..."
I think this is legal, but should it be?