lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Tue, Jul 14, 2020 at 7:51 PM Roberto Ierusalimschy
<> wrote:

> Do you know what are the valid modes for MSVS?

We have deduced that the mode parameter is a one or two letter string,
with the first letter 'r' or 'w', and the second, if present, 'b' or
't'. The latter chooses the binary or text mode, respectively. In a
single-letter mode string, the binary/text decision seems to be
controlled by a global variable or another API function.

In our private patch, we have decided to stick with Lua's
specification of io.popen(), which only supports "r" and "w", and make
it always select the binary mode. So our patch translates "r" and "w"
into "rb" and "wb", respectively, and raises a Lua error for other