Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

BackSpace

Jun
127
2
Sometimes TCC displays a backspace as a control character. Sometimes it filters it out. I have not figured out how it decides how to behave.

I think TEE always filters both the log and the stream.
 
Just experimenting, I found a few things that make me curious.

With ECHO and TYPE, BS is handled differently when it's at the end of a string from when it's not at the end.
Code:
v:\> echo ab%@char[8]
ab

v:\> echo ab%@char[8]cd
acd

I could not find a way to get BS shown as a symbol (glyph?).

Many other control characters, when input, appear as the default unprintable box, while, on output, appear as the more familiar symbol.
If, for example, I input Ctrl-z I see
Code:
v:\> <default box character here>
TCC: Unknown command "→"
 
Just experimenting, I found a few things that make me curious.

With ECHO and TYPE, BS is handled differently when it's at the end of a string from when it's not at the end.

WAD. A backspace character is not destructive (i.e., not the same as a delete character). It just moves the cursor. At an EOL, it moves it back one character but you don't see it since you immediately do a CR/LF.

This is all normal Windows console behavior; TCC isn't doing anything special with those characters.
 
What about the control character glyphs not appearing upon TCC input when using a Unicode font?

After all these years, I still expect to see an up-arrow when I press Ctrl-x (the 4DOS escape character).

They do appear in TC (same font, Andale Mono) and they also appear in TCC when using Terminal font.
 
Here's a good example. I get the glyph on output and in the history, but not on input.

upload_2016-7-29_12-0-48.png
 
The only way TCC could be involved is if you defined those keystrokes as macros or key aliases, or if you have an input color defined.

If you have an input color, TCC writes the character out using WriteConsoleOutputCharacter. Otherwise, it writes it using WriteConsole.

Either way, the resulting display is determined by Windows and by your font of choice, not TCC.
 
I did have bright yellow on black input. When I switched to "default", I see the glyphs.

Odd, though, with Terminal font, I see the glyphs even with custom input colors

Can't you use WriteConsoleOutputCharacter in both cases? It's a shame that using a custom input color together with a Unicode font clobbers those glyphs.
 
Can't you use WriteConsoleOutputCharacter in both cases? It's a shame that using a custom input color together with a Unicode font clobbers those glyphs.

?? Then you wouldn't see it in either case. And it would be slower. And it wouldn't support redirection.

And why the sudden interest in seeing unprintable characters? Do you actually have a need for them?
 
I have no particular need for them on the input line. They've been missing since at least 4NTv8 and I didn't miss them. I'm just being curious as usual
 
Back
Top