The standard 'fopen()' C function allows the
optional "b" mode specifier alongside "rwa+" to
specify that the file to be opened is binary.
Tcl's Tcl_(FS)OpenFileChannel commands do not
support "b" and throw an error if it is given. It
would be quite easy to parse out the "b" and do call
Tcl_SetChannelOption(NULL, chan, "-
translation", "binary") after the channel is opened.
Should this be added to Tcl?
I don't know enough about generic channels in Tcl
to know if it is possible for that action to fail or
otherwise cause problems (bear in mind that, with
VFS, the channel may not be a file, but could be a
memchan, for example).