How to? How to enable UTF-8 output in tcmd.ini

Feb 23, 2012
240
3
Tcmd.ini allows for an option "UnicodeOutput=Yes", to set redirection from the command line to be written as unicode (from what I can see, the output is saved as UTF-16 Little Endian). I understand that there is also a theoretical option to save the output as UTF-8, but I do not see how to set that option within tcmd.ini. Is it possible to do so?
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
There's actually a couple of ways to do this; one in the current build and another in a test build that will be uploaded in another day or two.

The current solution is to choose a UTF-8 codepage -- TCC will then automatically convert the internal Unicode to UTF-8 when redirecting output.

The second solution (currently in beta with some other users who only want UTF-8 output sometimes) is with the TCC /U8 startup option (or "OPTION //UTF8Output=Yes" from the TCC command line).

Neither approach is currently documented, as they were deemed too obscure and too experimental for 99.99% of the users. They will be documented when the beta version is released (hopefully by the end of this week).
 
Feb 23, 2012
240
3
Hi Rex,
When you say to choose a UTF-8 code page, I gather (from other forum postings) that you mean to run the command "chcp 65001".
However, I find that this code page does not operate properly at all. I have a bunch of files with Hebrew filenames, which display correctly with my standard code page (862), as well as with the Windows Hebrew code page (1255). However, when I shift into 65001, Hebrew characters are no longer displayed at all; instead, I just receive blank spaces and black lines when performing a "dir".
Is this is an internal problem, or do you think it is a font problem?
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
The UTF-8 code page option in TCC only affects redirected file output; it doesn't have anything to do with normal text display in the console.

Are you running TCC in a Take Command tab window, or in a stand-alone Windows console? If it doesn't display properly in a stand-alone Windows console, it's a Windows problem. If it displays in the Windows console but not in a Take Command tab window, it's either a Take Command problem or it's because you're using different fonts in the console and in Take Command.

(Windows has very limited UTF-8 support; it may be that they just don't support your environment.)
 
Feb 23, 2012
240
3
Hi Rex,
I'm using it in the TC tab window, and that's where I see the problem.
In contrast, in a standalone TCC window, running "chcp 65001" has no negative effect, and I can still see my Hebrew filenames.
Both windows are using the "CourierNew" font.
However, I notice that in the standalone TCC window, even after I run "chcp 65001", redirection of a directory listing results in a UTF-16 file, not a UTF-8 file.
- Avi
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
However, I notice that in the standalone TCC window, even after I run "chcp 65001", redirection of a directory listing results in a UTF-16 file, not a UTF-8 file.

Not reproducible here. Are you sure you didn't have UnicodeOutput (/U startup option) active? TCC will look for that before it looks for a UTF-8 codepage.
 
Feb 23, 2012
240
3
Hi Rex,
Yes, you solved it, that was it - I had UnicodeOutput set to Yes in my .ini file. Now that I changed that, I can successfully switch to "chcp 65001" and redirect as UTF-8. I didn't realize that the UnicodeOutput option overrode the code page selection.
We still have the issue of the non-appearing letters in the tab view when in code page 65001, but it's not at all a critical item, since I can always use the standalone terminal. So I think we can close this issue for now.
Thanks,
Avi


Not reproducible here. Are you sure you didn't have UnicodeOutput (/U startup option) active? TCC will look for that before it looks for a Unicode codepage.
 
Similar threads
Thread starter Title Forum Replies Date
Joe Caverly ENABLE and LOOKUPERRORS Support 1
P How to enable \ with tab completion Support 4
S How to? enable or disable screen saver password Support 5
J How do I enable an email feed of the new fora? Support 1
mscheuner RSS-enable these forums, please! Support 2
vefatica VIEW ... remember the UTF-8 setting? Support 0
Alpengreis UTF-8 problem in TCC related to Python Support 7
gschizas Fixed Using codepage 65001 (UTF-8) breaks non-ASCII characters Support 8
D How to? How to use TCC in UTF-8 mode? Support 4
jadaml Echo unicode characters from UTF-8 Batch files? Support 1
Stefano Piccardi UTF-8 BOM marker @iniread failure Support 6
M FFIND and LIST does not work for UTF-8 fles Support 10
nikbackm UTF-8 display in TCMD Support 1
A How to? TEE - duplicate output to STDERR Support 3
FreezerBurnt ANSI Prompt messes up list output. Support 39
Ó Recent git output not shown on TCC Support 1
Peter Murschall TEE cannot handle Unicode output Support 2
C TEE command appending null characters to output Support 6
Jesse Heines webform output different in ver. 26 than ver. 25 Support 2
vefatica Piping the output of a DO loop. Support 4
vefatica TCMD output invisible on Win10 Support 22
B How can TCC make an output as a part of command string Support 2
Enigma Take Command 23 duplicates output Support 0
Joe Caverly Works with CMD.EXE, no output with TCC.EXE Support 7
S Output from debugger Support 4
M TCC incorrect dir output since Windows 1803 Support 6
A WAD Output redirection to IF block fails with "unbalanced brackets" Support 7
P Scrollable colored output Support 3
scottb How to? ipconfig output in current window Support 4
David McClelland TEE command puts it's output file in c:\ Support 4
vefatica How to? TPIPE ... see output right away? Support 4
T Fixed Unnecessary debug output Support 3
JohnQSmith Weird DIR output (missing lines) Support 1
J WAD Output redirection in tcexit looses data Support 31
vefatica Console output slower that before Support 8
Mordachai How to capture all console output from a TCMD session? Support 4
C Output continues after Ctrl-Break Support 8
Steve Pitts WAD Strange output from DEL of a non-existent directory Support 7
I perl output is not visible Support 4
I v16 - cls corrupts output stream Support 7
D Fixed Minor problem: output not alligned in the tree command Support 1
vefatica WAD IDE, output window to foreground Support 3
R WAD Strange output from "memory" command Support 1
A How to? Set up a log file for all command output Support 3
A How to? Use TEE with .NET output Support 6
T How to? Logging Output from External Programs Support 4
Frank output of @ipaddress/@ipname Support 1
dcantor Unidentifiable output Support 16
Stefano Piccardi forum software writes debugging output Support 5
Stefano Piccardi TCC 13 vs. TCC 14 different FFIND /E"d$" output Support 1

Similar threads