Skip to content

[OMCSessionZMQ] escape strings to be used via OMC#369

Merged
adeas31 merged 3 commits intoOpenModelica:masterfrom
syntron:escape_strings
Nov 17, 2025
Merged

[OMCSessionZMQ] escape strings to be used via OMC#369
adeas31 merged 3 commits intoOpenModelica:masterfrom
syntron:escape_strings

Conversation

@syntron
Copy link
Copy Markdown
Contributor

@syntron syntron commented Nov 10, 2025

as strings in OMCPath are used via OMC, they are put into an expression as a string escaped by double quotes; thus, any quote within such a string should be escaped!

This is used at two points:

(1) copy the model file from local to the temporary directory (in ModelicaSystem.model() via write_text())
(2) if an string parameter is defined in ModelicaSystemDoE

test escape of double quotes and backslash in OMCPath.write_text() / .read_text()
@adeas31 adeas31 enabled auto-merge (squash) November 17, 2025 09:41
@adeas31 adeas31 merged commit 83552d8 into OpenModelica:master Nov 17, 2025
14 checks passed
@syntron syntron deleted the escape_strings branch November 17, 2025 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants