Hi everybody,
after spending two days reading stuff about documented and undocumented
functionality in Microsoft's API and CRT, I have come to the following
conclusions:
* In Windows, it is impossible to reasonably use POSIX functions to
read/write text from the console without letting the console do some
translation for you.
* Moreover, POSIX's functions do not work, because read() and write() may
actually read or write more bytes from the buffer thant you would want,
precisely due to this "clever" translation.
* This all renders the CRT unusable, and as stated in a MSDN blog from
Windows, one should stick to the Console read and write operations and
forget about C entirely.
Well, I have coded a prototype of a Lisp stream for the console. ECL now
has code that will detect whether the input/output/error channels are
consoles and wrap them around with these streams. Moreover, it will also
detect the current codepage and use it as external format for the stream.
All this is pretty much experimental and I need your help testing it.
Please report problems.
BTW, as usual, all this is only available in git/CVS
Juanjo
--
Instituto de FĂsica Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list