default translation of stdout on unix == crlf?
Open1657421fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 18 years ago
Descriptionplain2007-02-11 17:42:19
Hi,
$ tclsh
% fconfigure stdout
reports on Debian linux:
-blocking 1
-buffering line
-buffersize 4096
-encoding iso8859-15
-eofchar {}
-translation crlf <--
-mode 38400,n,8,1
-xchar
i.e. after each output line comes a CRLF, not, as could be expected from the default in tclUnixPort.h, just LF.
I can observe this with version 8.5a5, but also with the version shipped with Debian sarge, 8.4. It seems to be unimportant whether I start tclsh in a xterm, or in e.g. acme or gnome-terminal.
Perhaps the additional \r normally won't be observed, since programs like xterm or gnome-terminal apparently do not display it, but acme does.
The problem described in a thread "Wrong default end-of-line from tclsh", http://www.dbforums.com/showthread.php?t=938067, seems to have the same background.
Michael
dkfplain2007-02-12 01:23:24
Logged In: YES user_id=79902 Originator: NO The type of translation depends on what stdout really is. If it is going to a terminal, it is (currently) crlf. If it is going into a pipeline or to a file, it is lf. I don't know what the correct default mode for a terminal or serial line is (I'm assured that you can't tell those two cases apart).
dkf Ticket [1657421fff]: 2 changes
[History diff]2007-02-12 01:23:49
jidanniplain2008-09-01 04:59:33
Logged In: YES user_id=1971011 Originator: NO This is also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=364176 . Please fix.
Log in (anonymous is fine) to add a comment.