Actual quotes vs. " in command OUC files

This is somewhat of an annoyance for me — I suspect not so much for others — but I’m wondering why, in custom command OUC files, are double quotes within the instructions represented by " rather than actual double quote marks "? The reason it’s an annoyance for me is that I often tweak the instructions directly in these files, or in exported copies of them, via Notepad++, and the use of " hampers readability and editability for me. I’ve found that I can simply replace all instances of " with ", save, import the OUC files and use the commands just fine, so as far as I can tell the use of " isn’t necessary. For example, echo "{$mystring}" works just as well as echo "{$mystring}". Other lines in the OUC files use actual double quotes, such as:

<?xml version="1.0" encoding="UTF-8"?>
<usercommand backcol="none" hide_from_menu="no" textcol="none">
<function type="batch">

Granted, those double quotes are within the XML tags/attributes, but since the real marks work just as well as the entity references in the instruction text, why use the entity references? According to W3Schools, “Only < and & are strictly illegal in XML”. Additionally, I think if the user needs to embed one or more double quote marks within an already-quoted string, the entity references should be used inside the string, not as the outer quote marks. For example:

"This house is a so-called &quot;fixer-upper&quot;."

That is standard for HTML and a lot of XML.

It wont be changing. The config files are not intended to be read or edited directly, outside of unusual situations, and we don't encourage it in general. Use the user interface to make changes.

1 Like