BackSpace

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#3
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 "→"
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#4
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.
 
#5
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.
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#7
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.
 
#8
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.
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#9
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?