Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

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
 
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
 
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
 
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.
 
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
 
Back
Top
[FOX] Ultimate Translator
Translate