Hmmmm, I suspect that the redirected stream is is opened in text mode,
which translates newline characters into CRLF sequences.  See

http://msdn.microsoft.com/en-us/library/yeby3zcb(VS.71).aspx

for details.  I suspect the solution would be to have the SysFile
class detect the open mode for the stream when it's created from a
handle and adjust accordingly.  The best bet would be to somehow
change the stream mode to binary, if this is possible.  This would
keep data written by charout from getting corrupted.  If that's not
possible, then just detecting this is text mode and adjusting the line
terminator we write out would work for lineout, but charout would
still be a problem.

This is going to require a little more research on the options.

Rick

On Sun, Jun 29, 2008 at 3:56 PM, Mark Miesfeld <[EMAIL PROTECTED]> wrote:
> There is some problem with redirecting output into a file when using
> say that is causing the SourceFile.testGroup to fail.
>
> This demonstrates it:
>
> /* testSay.rex */
> say "it IS friday"
>
> Run it like this:
>
> E:\work.ooRexx\3.x\interpreter\Win32Dbg>.\rexx testSay.rex > tmpSay.out
>
> When you look at tmpSay.out in a hex editor you will see that the line
> ends with 0x0d0d0a instead of 0x0d0a.
>
> 69742049 53206672 69646179 0d0d0a
>
> When I step though it with the debugger like this:
>
> devenv /debugexe .\rexx testSay.rex
>
> i.e., not redirecting to a file, the output I see written is exactly
> right, no extra 0x0d.  When I run it like this:
>
> devenv /debugexe .\rexx testSay.rex > tmpSay.out
>
> it also looks right.  But the debugger is doing something so that the
> tmpSay.out file is empty.  So, I can not check the file to see if the
> extra 0x0d is there or not.
>
> I'm stumped.
>
> --
> Mark Miesfeld
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to