Get the most out of your Robelle Tools
Working with Files With Unprintable Characters
By Robelle Staff
1. What were these characters?
2. How could I get rid of them?
Answer 1: We used the Char and Decimal options of Qedits List command to see the numeric values of the offending characters. For example:
qux/list $h $c 35
We knew the line should have started with <H2>, but it had an extra mystery character at the start, which was shown as a dot on the right side of the List output. In the example, on the left side we can see that the character has a hex value of 0D.
Answer 2: The Change command can replace the offending character with a normal printing character, so that it can be edited in Visual mode, or we can use Change to remove the character by changing it to nothing. You can specify strings in the Change command by their numeric values. The numeric values must be specified in decimal, from 0 through 255. We know the hex value, 0D. Using the handy calculator built into Qedit, we see that hex 0D is decimal 13:
Now we can change the character whose value is 13 to nothing. Well do it in all lines of the file. First we put Qedit into decimal mode, then we do the Change command:
qux/set decimal on
There were a number of other mystery characters besides 0D/13. These we changed to other printing characters. When we had figured it all out, we put together a Use file with the change commands, so that we could easily make the same change to all the files created with PPTIA. The Use file had these lines in it:
The following question came to us from the support mailbox:
I have a QEDIT file that is displaying a ? at the beginning of some lines. I understand that this indicates that the line contains nonprintable characters. How can I get QEDIT to display the data so that I can determine what the data is?
One way to display the data is by using QZMODIFY as follows:
The Visual screen with an unknown character in the line will resemble the following:
Set modify to QZMODIFY: /set mod qz. Now modify the line in question: /m1
Qedit will display the line, but the cursor will not be underneath the line, it will be on the line.
Press the spacebar until the cursor is directly on top of the line with the mystery period, then press Control-W followed by a question mark (?).
Qedit will then display the data:
ASCII character code = #25 , %000031, $0019
In this case, the character was a decimal 25 = octal 31 = hex 19. Press the Return key to get out of modify mode.
If you need to change this character, then use Set Decimal On and single quotation marks to isolate the decimal 25. For example,
/set dec on
Copyright The 3000 NewsWire. All rights reserved.