Changing Strings with Nonprinting Characters

Sometimes you want to change strings that contain a nonprinting character to something else. For example, changing a display attribute from <esc>&dJ to <esc>&dD. The Qedit Change command would be

/set decimal on /changeq '27"&dJ" '27"&dD" all

You must have Set Decimal On in order for this to work. You can also change strings composed of multiple values of nonprintables. For instance, you may want to append line breaks to your file so that it is compatible with a specific PC application.

/appendq '13'10 all {carriage-return line-feed}

It's probably a good idea to use the "quiet" option when you change nonprinting characters because you may get unexpected results. The terminal or terminal program can magically get its configuration changed when displaying an escape sequence. Worse yet, an escape sequence can even trigger a "transmit" function, sending whatever is on the display to the host computer. For example, the accidental transmission of rm * (remove all files!) is known in computer jargon as a "bad thing."

Also: A Method of Viewing Unprintables

And: Another Method of Viewing Unprintables

....Back to the Qedit Q&A Page