On Wed, Aug 4, 2021 at 6:59 PM Aaron Priven <aaron@priven.com> wrote: > On August 3, 2021 13:26, Felipe Gasper wrote: > > It sounds like you want STDIN/STDOUT/STDERR and @ARGV to be decoded by > default, in addition to the source code. TBH that makes more sense to me > than the present proposal since it would preserve parity of character > encoding for simple programs, though I think it would still sow confusion > since other filehandles will remain binary by default: > > Are other filehandles binary by default? I thought they were text by > default, with the â:crlf" layer applied on those operating systems where it > is appropriate. Perhaps in 2021 âtext by defaultâ should include encoding. > They are "text by default" in the ASCII sense, not the Unicode sense. The :crlf layer is enabled by default on Windows and translates CR LF to LF, but there is no default translation of bytes to characters. So you need to use binmode or :raw to make a filehandle binary-compatible on Windows, but you also need to apply an :encoding layer if you want to read/write characters instead of bytes. -DanThread Previous | Thread Next