diff libinterp/corefcn/pr-output.cc @ 31961:c1fc1e821381 stable

Don't use encoding facet when writing bytes to stream (bug #63931). * libinterp/corefcn/oct-stream.h (octave::stream::output_stream): Do not return output stream with encoding facet. (octave::stream::preferred_output_stream): Add new function that returns output stream with encoding facet if applicable. * libinterp/corefcn/pr-output.cc (Ffdisp): Use new function `preferred_output_stream` instead of `output_stream`.
author Markus Mützel <markus.muetzel@gmx.de>
date Sat, 01 Apr 2023 18:34:27 +0200
parents dd23a26b7294
children 476c84c4f201 1f7958de177f
line wrap: on
line diff
--- a/libinterp/corefcn/pr-output.cc	Sat Apr 01 11:47:51 2023 -0400
+++ b/libinterp/corefcn/pr-output.cc	Sat Apr 01 18:34:27 2023 +0200
@@ -3397,7 +3397,7 @@
 
   stream os = streams.lookup (fid, "fdisp");
 
-  std::ostream *osp = os.output_stream ();
+  std::ostream *osp = os.preferred_output_stream ();
 
   if (! osp)
     error ("fdisp: stream FID not open for writing");