-- On Windows, if this is a read/write handle and we are in text mode,
-- turn off buffering. We don't correctly handle the case of switching
-- from read mode to write mode on a buffered text-mode handle, see bug
-- On Windows, if this is a read/write handle and we are in text mode,
-- turn off buffering. We don't correctly handle the case of switching
-- from read mode to write mode on a buffered text-mode handle, see bug