Re: issue with read_stream_to_codes/2 on windows
Jos De Roo <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <OF00A39EF9.FAB34838-ONC1257C91.003EB3C3-C1257C91.003F92E9@agfa.com> |
Hi Jan, Thanks so much for the prompt action and it now all works fine with tha latest stable 6.6.2 version. It is really good to have this fixed! With best regards, Jos Kind Regards, Jos De Roo | Agfa HealthCare Senior Researcher | HE/Advanced Clinical Applications Research T +32 3444 7618 | F +32 3 444 8211 | M +32 494 56 03 95 http://www.agfahealthcare.com http://blog.agfahealthcare.com R.O.: Septestraat 27, B-2640 Mortsel, Belgium | RLE Antwerp | VAT BE 0403.003.524 | IBAN Operational Account BE81363012356224 | IBAN Customer Account BE20375104592856 | ING Belgium NV, B-1000 Brussels Click on link to read important disclaimer: http://www.agfahealthcare.com/maildisclaimer From: Jan Wielemaker <[email protected]> To: Jos De Roo/AMDUS/AGFA@AGFA, <[email protected]> Date: 03/03/2014 11:59 Subject: Re: [SWIPL] issue with read_stream_to_codes/2 on windows Sent by: [email protected] Hi Jos, SWI-Prolog uses I/O wrappers if it is running in a Windows console to support colored output and unbuffered input. This only used to check output. I've now added test for input. This also makes stream_property/2's tty(Bool) property work as it should. Should be in tomorrows daily builds. Cheers --- Jan On 03/01/2014 12:21 PM, Jos De Roo wrote: > Hi Jan, > > Here is an issue with read_stream_to_codes/2 on windows: > > D:\>echo hello | swipl -g "read_stream_to_codes(user_input, Codes), > atom_codes(Atom, Codes), write(Atom)" > |: > ERROR: Prolog initialisation failed: > ERROR: read_util:read_stream_to_codes/2: I/O error in read on stream > user_input (The handle is invalid. > ) > > Typing a ^Z after "hello" works: > > D:\>echo hello^Z | swipl -g "read_stream_to_codes(user_input, Codes), > atom_codes(Atom, Codes), write(Atom)" > hello > > but this cannot be done for other cases like: > > D:\>type hello.txt | swipl -g "read_stream_to_codes(user_input, Codes), > atom_codes(Atom, Codes), write(Atom)" > |: > ERROR: Prolog initialisation failed: > ERROR: read_util:read_stream_to_codes/2: I/O error in read on stream > user_input (The handle is invalid. > ) > > > Kind Regards, > > Jos De Roo | Agfa HealthCare > Senior Researcher | HE/Advanced Clinical Applications Research > T +32 3444 7618 | F +32 3 444 8211 | M +32 494 56 03 95 > > http://www.agfahealthcare.com > http://blog.agfahealthcare.com > R.O.: Septestraat 27, B-2640 Mortsel, Belgium | RLE Antwerp | VAT BE > 0403.003.524 | IBAN Operational Account BE81363012356224 | IBAN Customer > Account BE20375104592856 | ING Belgium NV, B-1000 Brussels > Click on link to read important disclaimer: > http://www.agfahealthcare.com/maildisclaimer > -------------- next part -------------- > HTML attachment scrubbed and removed > _______________________________________________ > SWI-Prolog mailing list > [email protected] > https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog > _______________________________________________ SWI-Prolog mailing list [email protected] https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog -------------- next part -------------- HTML attachment scrubbed and removed