I believe this was tried and the problem was that
J is linked statically to CRT and the structures
are internal. So the DLL call won't have the effect.

There is a work arround, but it's a hack. See
stdout definition at the bottom of 
http://jsoftware.com/svn/addons/trunk/web/jhp/jhp.ijs

--- June Kim <[EMAIL PROTECTED]> wrote:

> Would this work?
> 
> 'msvcrt _setmode + i i i' cd 1;32768  NB. 1 is stdout, 32768 is _O_BINARY
> 
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt__setmode.asp
> 
> 
> 2007/1/6, Eric Iverson <[EMAIL PROTECTED]>:
> > 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" <[EMAIL PROTECTED]>
> > To: "Beta forum" <[email protected]>
> > 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



__________________________________________________
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