Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unescape Modelica strings before presenting them to the user #92

Open
CSchoel opened this issue Jul 5, 2021 · 0 comments
Open

Unescape Modelica strings before presenting them to the user #92

CSchoel opened this issue Jul 5, 2021 · 0 comments
Assignees

Comments

@CSchoel
Copy link
Contributor

CSchoel commented Jul 5, 2021

Some (if not all?) OpenModelica Scripting API commands that return Strings, return them in the same format as they would need to be written in a Modelica program, i.e. with escape signs for newlines, quotes, and the like. You should therefore...

  1. Check whether omc-java-api already performs some unescaping, and if this is the case check whether it is correct. As a reference, you can use the unescape function in MoST.jl. It is tested for quite a few cases and the collection of escaped signs is taking directly from the Modelica Specification.
  2. Keep an eye out for escape signs in your output and verify if they should be there or not.
  3. If you notice any issues, implement your own unescape function that fixes them or (if it exists) fix the unescape in omc-java-api.
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

No branches or pull requests

2 participants