This plugin takes advantage of Unicode’s “Halfwidth and Fullwidth Forms” block, specifically the characters at U+FF01 through U+FF5E. These characters correspond to ASCII characters 0x20 through 0x7E, and when redirected to a file with //UnicodeOutput=No, they will even be automatically translated back to their ASCII equivalents. But TCC doesn’t assign any significance to these remapped “safe” characters, so you can safely use them in a batch file and they will be handled like ordinary text characters.
Depending on your font, whether TCC is running in a standalone console window or within a Take Command tab, the phase of the moon and general Windows witchiness, the remapped “safe” characters may or may not appear the same on-screen as their ASCII equivalents. If you see empty boxes instead of normal-looking characters, try a different font. The default “Raster Fonts” works well for me, although it’s not terribly attractive.
By default, the characters defined as “dangerous” by this plugin are:
Character | ASCII | Remapped to | |
double quotes | " | 34 / 0x22 | U+FF02 |
percent sign | % | 37 / 0x25 | U+FF05 |
ampersand | & | 38 / 0x26 | U+FF06 |
open parenthesis | ( | 40 / 0x28 | U+FF08 |
close parenthesis | ) | 41 / 0x29 | U+FF09 |
less-than sign | < | 60 / 0x3C | U+FF1C |
greater-than sign | > | 62 / 0x3E | U+FF1E |
open bracket | [ | 91 / 0x5B | U+FF3B |
close bracket | ] | 93 / 0x5D | U+FF3D |
caret | ^ | 94 / 0x5E | U+FF3E |
grave accent / backquote | ` | 96 / 0x60 | U+FF40 |
vertical bar | ¦ | 124 / 0x7C | U+FF5C |
You can customize this list, adding or removing unsafe characters, with
the UNSAFE
command.
Note that this list includes the default command separator and the default escape character. If you use non-default settings for these characters, I suggest changing back to the defaults at least temporarily while using this plugin’s features:
setlocal
setdos /c38 /e94 /p36
...
endlocal
As mentioned above, when //UnicodeOutput=No you can redirect these “safe” characters and they will automatically be replaced with their ASCII equivalents. This convenient fix won’t happen when //UnicodeOutput=Yes, though; you’ll get strange characters in the output file. To write Unicode to a file, converting the remapped “safe” characters back to their original values, a @SAFEWRITE function is provided.
No provision is made for remapping or handling the ASCII NUL, character 0.