Re: exec encoding
- From: Robert Heller <heller@xxxxxxxxxxxx>
- Date: Sat, 14 Apr 2007 20:40:07 +0200
At Sat, 14 Apr 2007 19:54:12 +0200 Goeran Hanke <goeran.hanke@xxxxxxxxxxxxxx> wrote:
Hello,
the exec command returns the output of the program. Like this:
image create photo -data [exec import -window root gif:-]
The output of the program is binary data and the image is wrong. The
above command works if the format is xpm (7 bit ascii). I assume the
output of the command is converted to utf-8. The following snippet works
correctly:
set f [open "|import -window root gif:-" r]
fconfigure $f -translation binary
image create photo -data [read $f]
close $f
Is there any way to get the exec way work?
Why? What is wrong with using the pipe method?
Something like "exec -translation binary ..."
Greetings from Leipzig
G=F6*8 Bit makes me drunken*ran
--=20
string map { DOT . AT @ } goeranDOThankeATgmxDOTde
--
Robert Heller -- 978-544-6933
Deepwoods Software -- Linux Installation and Administration
http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
heller@xxxxxxxxxxxx -- Contract Programming: C/C++, Tcl/Tk
.
- Follow-Ups:
- Re: exec encoding
- From: Darren New
- Re: exec encoding
- References:
- exec encoding
- From: Goeran Hanke
- exec encoding
- Prev by Date: exec encoding
- Next by Date: Re: C++/TCL Need Solution to Compile Error c2784
- Previous by thread: exec encoding
- Next by thread: Re: exec encoding
- Index(es):
Relevant Pages
|