# HG changeset patch # User Arun Giridhar # Date 1679688186 14400 # Node ID fcd97a68e5f754807c29e19b24c3adca68241d2a # Parent 073cc98750c616b1ae0a28ba7d251887d735658a oct-stream.h: Do not convert text encoding for binary streams (bugs 63415 and 63931) * oct-stream.h (preferred_output_stream): Previously, text encoding conversions were skipped if the stream was in UTF-8. This change also includes binary streams as streams to skip encoding conversion for. diff -r 073cc98750c6 -r fcd97a68e5f7 libinterp/corefcn/oct-stream.h --- a/libinterp/corefcn/oct-stream.h Fri Mar 24 08:40:01 2023 -0700 +++ b/libinterp/corefcn/oct-stream.h Fri Mar 24 16:03:06 2023 -0400 @@ -123,7 +123,7 @@ std::ostream * preferred_output_stream (void) { - if (! m_encoding.compare ("utf-8")) + if (! m_encoding.compare ("utf-8") || (m_mode & std::ios::binary)) return output_stream (); if (m_conv_ostream)