TPIPE: /FILTER and /OUTPUT unexpected incompatibility

I am using TCC 14.0.32 under Windows XP.

I am trying to use TPIPE to convert an Ansi file to UTF-16 and add a BOM to the front. After some experimentation I was able to get it to work. I then decided that it would be nice to save the sequence so I could use it whenever I wanted without retyping the whole thing. So I entered:
Code:
tpipe /unicode=ansi,utf-16le /string=1,0,\xff\xfe /save=a2u.tpf
and then tried using it with:
Code:
tpipe /input=in.txt /output=out.txt /filter=a2u.tpf

The result was that my filter was applied but In.txt was replaced with the Unicode version. Out.txt was never created. Is /FILTER supposed to behave this way? If so, is there a way to get TPIPE to send its output to the specified output file when using /FILTER?

--
Howard
 
I am using TCC 14.0.32 under Windows XP.

I am trying to use TPIPE to convert an Ansi file to UTF-16 and add a BOM to the front. After some experimentation I was able to get it to work. I then decided that it would be nice to save the sequence so I could use it whenever I wanted without retyping the whole thing. So I entered:
Code:
tpipe /unicode=ansi,utf-16le /string=1,0,\xff\xfe /save=a2u.tpf
and then tried using it with:
Code:
tpipe /input=in.txt /output=out.txt /filter=a2u.tpf

The result was that my filter was applied but In.txt was replaced with the Unicode version. Out.txt was never created. Is /FILTER supposed to behave this way? If so, is there a way to get TPIPE to send its output to the specified output file when using /FILTER?

--
Howard
I'm still seeing this issue with build 33. Is this something that can be fixed in TCC or would it require a change in Textpipeengine? Or am I misunderstanding how it's supposed to work?

--
Howard
 
May 20, 2008
11,547
107
Syracuse, NY, USA
I see it too.
Code:
v:\> tpipe /simple=34 /save=rev.tpf
 
v:\> echo 1^r^n2^r^n3 > 123.txt
 
v:\> tpipe /input=123.txt /filter=rev.tpf
3
2
1
 
v:\> type 123.txt
1
2
3
 
v:\> tpipe /input=123.txt /output=321.txt /filter=rev.tpf
 
v:\> type 321.txt
TCC: (Sys) The system cannot find the file specified.
"V:\321.txt"
 
v:\> type 123.txt
3
2
1
 
May 20, 2008
11,547
107
Syracuse, NY, USA
I see it too.
Code:
v:\> tpipe /simple=34 /save=rev.tpf
 
v:\> echo 1^r^n2^r^n3 > 123.txt
 
v:\> tpipe /input=123.txt /filter=rev.tpf
3
2
1
 
v:\> type 123.txt
1
2
3
 
v:\> tpipe /input=123.txt /output=321.txt /filter=rev.tpf
 
v:\> type 321.txt
TCC: (Sys) The system cannot find the file specified.
"V:\321.txt"
 
v:\> type 123.txt
3
2
1

My simple example works OK when /filter-rev.tpf is *NOT* the last argument.
Code:
v:\> del 321.txt
Deleting V:\321.txt
    1 file deleted
 
v:\> type 123.txt
1
2
3
 
v:\> tpipe /input=123.txt /filter=rev.tpf /output=321.txt
 
v:\> type 123.txt
1
2
3
 
v:\> type 321.txt
3
2
1
 

rconn

Administrator
Staff member
May 14, 2008
12,406
152
The result was that my filter was applied but In.txt was replaced with the Unicode version. Out.txt was never created. Is /FILTER supposed to behave this way? If so, is there a way to get TPIPE to send its output to the specified output file when using /FILTER?

The textpipeengine.dll wants the /filter argument to be entered prior to /output. This isn't documented, so I don't know if it is by design; I've queried the developers about it.
 
Jan 19, 2011
605
15
Norman, OK
The textpipeengine.dll wants the /filter argument to be entered prior to /output. This isn't documented, so I don't know if it is by design; I've queried the developers about it.
I haven't tried it, but possibly to allow chained outputs?
Code:
tpipe /input=input.txt /filter=1.tpf /output=a.txt /filter=2.tpf /output=b.txt
 
Similar threads
Thread starter Title Forum Replies Date
old coot Interesting TPIPE sort algorithm artifact Support 4
samintz How to? TPIPE /simple=61 Support 6
R Bug TPIPE's pdf to text conversions don't work Support 2
Kachupp How to? tpipe Support 4
H TPIPE /simple=4 Support 12
D TPIPE produces unwanted logs. Support 1
Kachupp How to? tpipe Support 8
vefatica Documentation TPIPE, /perl, DotMatchesNewLines Support 1
vefatica Stop TPIPE /EOL removing bad EOLs (and TPIPE changine EOLs)? Support 2
vefatica TPIPE in an alias? Support 2
C How to? TPIPE ?'s Support 2
H History and TPipe Oddness Support 3
Jay Sage Baffling Behavior With TPIPE Support 5
vefatica TPIPE: unbalanced escaped quotes in a regex? Support 5
Joe Caverly Multiple Text Searches at once using FFIND or TPIPE Support 4
Kachupp FFIND TPIPE Support 9
vefatica TPIPE and avarice? Support 5
Peter Murschall TPIPE generate unicode on Piping or redirecting Support 3
x13 TPIPE /REPLACE - Remove line (including EOL) Support 3
Charles Dye Documentation TPIPE /REPLACELIST Support 0
Joe Caverly TPIPE and /inputstring Support 3
vefatica How to? Add real <ESC> characters with TPIPE Support 2
vefatica How to? TPIPE ... see output right away? Support 4
vefatica TPIPE.EXE crashes on Ctrl-C Support 9
O TPIPE: Error -Can´t access textpipeengine.dll Support 24
vefatica Extract fields with TPIPE? Support 10
vefatica TPIPE, crash and question Support 1
MickeyF Another TPIPE question Support 6
MickeyF Can't get my TPIPE /replace to work Support 4
Joe Caverly Printing TPIPE documentation Support 3
C WAD tpipe /simple=28 Support 8
vefatica Remove double-quotes with TPIPE Support 4
vefatica TPIPE crashes on Ctrl-C Support 1
C How to? Add date/time to custom tpipe based BTM Support 1
C tpipe /simple=28 error Support 5
C TPipe /dup Support 5
T TPipe: Replacing String with Double Quotes Support 3
C tpipe and extract email addresses Support 1
vefatica How do I do this with TPIPE? Support 1
vefatica TPIPE's /perl option? Support 1
D TPIPE help typo Support 0
vefatica TPIPE access violations are back Support 2
Joe Caverly Word Count using TPIPE Support 10
Dan Glynhampton TPIPE in Build 41 Support 4
Phileosophos TPIPE doesn't work at all with v16 Support 3
vefatica TPIPE access violation again Support 1
David McClelland TPIPE matching problem Support 3
vefatica TPIPE: Access violation Support 5
jbanaszczyk TCMD 16 - TPIPE Support 4
P TPipe relaunches TCC window and 4start, etc Support 7

Similar threads