in reply to Re^2: How to tell if a stream is already in UTF8 mode?
in thread How to tell if a stream is already in UTF8 mode?

The lower level layers 'know', and will emit a warning if they detect chars > 255 on a stream NOT marked as UTF8, AND will not encode chars between 128 - 255, as UTF8 unless the stream was previously marked as UTF8.

The lower level always expects bytes. (Files are blocks/streams of bytes.) It will ALWAYS emit a warning if it detects chars >255.

  • Comment on Re^3: How to tell if a stream is already in UTF8 mode?