Correct response for a DECRQSS query?
j4james opened this issue ยท 4 comments
According to the VT330/VT340 Text Programming Reference, the response to the DECRQSS
query is a DECRPSS
sequence with a parameter value indicating whether the request was valid or not.
0 = host's request is valid.
1 = host's request is invalid.
I've checked as many other manuals as I could find, and most seem to agree with this. This includes the VT320 user manual, the VT420 programming reference, the VT510 programming reference, and the VT520/VT525 programming reference.
However, the DEC STD-070 reference describes these values the other way, and so do the VT382 manuals.
0 = unknown selection or setting
1 = request successful
I'm hoping you'll be able to confirm which of these is correct, at least for the VT340.
Here is an example of a valid query (requesting the SGR state):
printf '\eP$qm\e\\'; read -n 100
In theory it should respond with something like this:
^[P0$r0m^[\
And this is an example of an invalid query:
printf '\eP$qx\e\\'; read -n 100
Which should respond with something like this:
^[P1$r^[\
If that's not what you're seeing, then maybe we've got another entry for the errata doc.
The VT320 manual and DEC STD-070 seem to be correct while the VT340 manual is mistaken. This make some sense since the VT320 came after the VT330 & 340.
$ printf '\eP$qm\e\\'; read -rd '\'; echo
^[P1$r0m^[\
$ printf '\eP$qx\e\\'; read -rd '\'; echo
^[P0$r^[\
$
Thanks. That's a relief, actually, because that's what most modern terminals have been doing. But note that the test you added to the errata doc has the wrong read delimiter (it's using a forward slash rather than backslash).
Thanks for catching that. Wouldn't want someone else to have to create an errata doc for my errata doc.
Just wanted to say thanks!
I was basing my own implementation on the VT510 manual, and was confused by both XTerm's and mlterm's responses...