changeset 25370:9cc1ca6538e3

Always return previous mfile_encoding setting (bug #53842). * input.cc (F__mfile_encoding__): Always return previous mfile_encoding setting.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 10 May 2018 21:05:55 +0200
parents c89fa0989e7b
children 41bbdf17f51a
files libinterp/corefcn/input.cc
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/input.cc	Sat May 12 19:07:58 2018 +0200
+++ b/libinterp/corefcn/input.cc	Thu May 10 21:05:55 2018 +0200
@@ -1435,6 +1435,7 @@
   if (nargin > 1)
     print_usage ();
 
+  std::string old_mfile_encoding = Vmfile_encoding;
   if (nargin > 0)
     {
       std::string str = args(0).xstring_value (
@@ -1464,5 +1465,5 @@
           Vmfile_encoding = str;
         }
     }
-    return ovl (Vmfile_encoding);
-}
\ No newline at end of file
+    return ovl (old_mfile_encoding);
+}