Which characters are permitted to be used in SETDOS /E ?

The TCC's Help says:
You cannot use any of the redirection characters (| > <) or a space, tab, comma, or equal sign as the escape character.

The default escape character ^ is a normal character in file names. When I try to change the escape char by setdos /E¶ [the ¶ seems far less probably being included in file names], the TCC said this is illegal. The question is which characters are not allowed to be used in the setdos /e and why the Help hides this?
 

rconn

Administrator
Staff member
May 14, 2008
12,183
141
SETDOS /E is (very, very) obsolete - it was intended as a way to ease the transition from COMMAND.COM to CMD.EXE syntax. If you change it on your system, you'll lose the ability to run third-party batch files (which universally use ^ now). I strongly advise against changing the default value.

That said, you can use any non-alphanumeric character, *provided* it's an ASCII value (> 0 and < 255). If you want to use a Unicode character (> 255) you have to enter it as a numeric value.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,365
83
Albuquerque, NM
prospero.unm.edu
When I try to change the escape char by setdos /E¶ [the ¶ seems far less probably being included in file names], the TCC said this is illegal.

That works for me here:
Code:
C:\>setdos
ANSI=1
COMPOUND=&
DESCRIPTIONS=1  (DESCRIPT.ION)
ESCAPE=^
EVAL=0.10
EXPANSION=0
MODE=1
NOCLOBBER=1
PARAMETERS=$
CURSOR OVERSTRIKE=100
CURSOR INSERT=15
VERBOSE=1

C:\>setdos /E¶

C:\>setdos
ANSI=1
COMPOUND=&
DESCRIPTIONS=1  (DESCRIPT.ION)
ESCAPE=¶
EVAL=0.10
EXPANSION=0
MODE=1
NOCLOBBER=1
PARAMETERS=$
CURSOR OVERSTRIKE=100
CURSOR INSERT=15
VERBOSE=1

C:\>

(The 4DOS default was Control-X, which should never appear in a filename. You can use this character with SETDOS /X24.)
 
Some research had showed that the discussed command works differently on the keyboard input and from a command file.
setdos_E~kbd.gif
setdos_E~cmdfile.gif

For some reason the character with the code 0xB6 is displayed differently in the 2 cases, while the code page is set identical. On the keyboard input it is ANSI pilcrow sign, while the file input window shows the OEM table drowing symbol like the BIOS and the MS-DOS did. This is also a strange behavior.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,365
83
Albuquerque, NM
prospero.unm.edu
For some reason the character with the code 0xB6 is displayed differently in the 2 cases, while the code page is set identical. On the keyboard input it is ANSI pilcrow sign, while the file input window shows the OEM table drowing symbol like the BIOS and the MS-DOS did. This is also a strange behavior.

Maybe your text editor is using code page 1251? I suggest that you save your batch file as Unicode (UTF-16).
 
Maybe your text editor is using code page 1251?
No. The editor indicates the code of the character at the cursor position in its status bar, the code of the character in question is 0xB6. and the code page is set 866 for boh windows. I don't undersand why the tcc.exe displays ¶ in its window when <Alt+182> or <Alt+0182> is typed from the keyboard while displaying ╢ (properly, according to the code page 866) tracing a command file.
 
The TCC program seems to display the code page 1251, the default Windows code page, while the command CHCP 866 had been executed. And it 'understands' such characters differently when they are input at command prompt and from command files.



The text in the file attached is taken from a TCC's window.
 

Attachments

  • picresc.log.txt
    2.8 KB · Views: 92