-
Notifications
You must be signed in to change notification settings - Fork 217
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
how to specify an empty string for strm2oas --subst-char ? #1885
Comments
I would prefer the "default" to be "don't replace anything", one could use --subst-char "*" to get the current behavior. |
Hi Stefan, Looks like the parser has trouble with passing empty strings. The "don't substitute" default behavior proposal is fine with me as long as it applies to "strm2oas". For the GUI application I think, the default should be some safe value. But it could be made optional, so you can turn off character substitution. Matthias |
I always expect any tool to write exactly what it read by default. Currently I can’t switch off strm2oas subst-char, in klayout I can do that. I believe the best solution is to change strm2oas default to “don’t substitute”. |
gds doesn't have the concept of "illegal characters". They were there either because a certain layout tools allows <tab> or <cr> to be entered in their text entry form and people created multi-line text entries. In both cases, it would be much preferred if a round trip gds->oasis->gds "keeps the TEXT as it was". |
I changed the parser to accept empty --subst-char using
However, the default is "don't substitute" now, so this patch actually is not required. I left it for completeness. Matthias |
In klayout, if the substitution string is "empty" illegal characters in TEXT will not be substituted.
How can I specify an empty string for strm2oas on the command line ?
strm2oas --subst-char test_illegal_char/test.oas a.oas
ERROR: Additional arguments required (use -h for help)
strm2oas --subst-char "" test_illegal_char/test.oas a.oas
ERROR: Additional arguments required (use -h for help)
strm2oas --subst-char '' test_illegal_char/test.oas a.oas
ERROR: Additional arguments required (use -h for help)
strm2oas --subst-char \"\" test_illegal_char/test.oas a.oas
This is the only one not giving an ERROR, but uses * as substitution character.
TEXTSTRING "illegal*"
I had to gzip the .oas file to be able to attach it, please gunzip, it's a strict oas.
test.oas.gz
The text was updated successfully, but these errors were encountered: