octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #63930] fprintf problem


From: Arun Giridhar
Subject: [Octave-bug-tracker] [bug #63930] fprintf problem
Date: Fri, 24 Mar 2023 12:07:10 -0400 (EDT)

Follow-up Comment #18, bug #63930 (project octave):

Right... I see the same:

$ file *txt
01_D_patched.txt:   Unicode text, UTF-8 text
01_D_unpatched.txt: ISO-8859 text
02_D_patched.txt:   Unicode text, UTF-8 text
02_D_unpatched.txt: ISO-8859 text


I tried tweaking the patch like this:

diff -r c735cce18c7a libinterp/corefcn/oct-stream.h
--- a/libinterp/corefcn/oct-stream.h    Thu Mar 23 16:22:59 2023 -0400
+++ b/libinterp/corefcn/oct-stream.h    Fri Mar 24 11:57:24 2023 -0400
@@ -127,7 +127,7 @@ public:
 
     // wrap the output stream with encoding conversion facet
     std::ostream *os = output_stream ();
-    if (os && *os)
+    if (os && *os && ! (m_mode & std::ios::binary))
       {
         convfacet_u8 *facet = new convfacet_u8 (m_encoding);
         std::wbuffer_convert<convfacet_u8, char> *converter


But it gave the same results as the previous patch. It fixes fwrite but
fprintf needs some exception?



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63930>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]