Mercurial > octave
changeset 31925:fcd97a68e5f7 stable
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.
author | Arun Giridhar <arungiridhar@gmail.com> |
---|---|
date | Fri, 24 Mar 2023 16:03:06 -0400 |
parents | 073cc98750c6 |
children | cd5be42a81ab 969e5173f772 |
files | libinterp/corefcn/oct-stream.h |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)