To be specific, concerning what stream numbers to use:

I suggest changing existing 4 for binary output and not 
adding new numbers (6 and 7):

 - or it will require same added to Unix versions for
   consistency
 - or will make J and user code more complicated
 - there aren't many (if any at all) uses of 1!:2&4 at least
   for Windows, and it will be easy to fix
 - this will be used for true binary output such as
   images or precise text
 - 1!:2&4 is unlikely to require CRLF ever and
   easy to compensate

So it's easier and CR will never be missed.

There is no need to change stderr (1!:2&5), because it's
always for text output and not binary, so CRLF is OK.

If anybody thinks otherwise, please comment.


--- Eric Iverson <[EMAIL PROTECTED]> wrote:

> With luck the change in windows j602 jconsole to use binary stdio will be in 
> the c or d beta.
> 
> ----- Original Message ----- 
> From: "Oleg Kobchenko" <[EMAIL PROTECTED]>
> To: "Beta forum" <[email protected]>
> Sent: Thursday, November 08, 2007 12:43 PM
> Subject: [Jbeta] Stdout write in binary mode for windows
> 
> 
> > Is there anything in j602 related to
> > binary stdout/stderr?
> >
> >
> > http://www.jsoftware.com/pipermail/beta/2007-January/002148.html
> > --------------------------------------------------------------------------------
> > [Jbeta] Stdout write in binary mode for windows
> > Eric Iverson eiverson at sympatico.ca
> > Fri Jan 5 23:12:05 HKT 2007
> >
> > I will take a look at this. It is a good suggestion and something will
> > be done unless there are unforseen problems.
> >
> > Are there compatibility issues with old uses?
> >
> > What about 5 for stderr.
> >
> > It might be easier (and take less analysis) to simply add 6 and 7 for
> > binary versions of 4 and 5.
> >
> > Joey and other console users: any comments on this?
> >
> > ----- Original Message ----- 
> > From: "Oleg Kobchenko" <olegykj at yahoo.com>
> > To: "Beta forum" <beta at jsoftware.com>
> > Sent: Thursday, January 04, 2007 6:41 PM
> > Subject: [Jbeta] Stdout write in binary mode for windows
> >
> >
> >> Now there is no way to emit binary data
> >> using stdout. For example, this is important
> >> for CGI binary output, such as images;
> >> or if J is used as a slave process to return
> >> binary data through the pipe, like task.
> >>
> >> Is it possible in the upcoming release to
> >> change the implementation of 1!:2&4
> >> so that it uses binary mode instead of text mode?
> >>
> >> If somebody needs to output CRLF in text for windows
> >> it easy to do in J before calling the function
> >> or use "echo" (1!:2&2) which could remain in text mode.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to