Add string decode/encode api

This commit is contained in:
Thomas Krijnen
2026-08-22 13:12:36 +02:00
parent a5e94cf0d8
commit 87bc6bfbab
8 changed files with 55 additions and 5 deletions
@@ -1,6 +1,14 @@
import ifcopenshell
def test_spf_strings_can_be_encoded_and_decoded():
decoded = "Café's \\"
encoded = r"'Caf\X2\00E9\X0\''s \\'"
assert ifcopenshell.encode_spf_string(decoded) == encoded
assert ifcopenshell.decode_spf_string(encoded) == decoded
def test_skip_over_non_entity_instance():
data = """
ISO-10303-21;