changeset 31947:89850bb5eb31

maint: Merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 31 Mar 2023 18:07:24 +0200
parents 2a75c771c451 (current diff) 0ed6d1f01625 (diff)
children 1dba35103327
files
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/file-io.cc	Fri Mar 31 17:43:55 2023 +0200
+++ b/libinterp/corefcn/file-io.cc	Fri Mar 31 18:07:24 2023 +0200
@@ -500,8 +500,7 @@
 character string that specifies whether the file is to be opened for
 reading, writing, or both.  The @var{encoding} is a character string with a
 valid encoding identifier.  This encoding is used when strings are read from
-or written to the file.  By default, the same encoding specified for reading
-@file{.m} files is used for interpreting user files.
+or written to the file.  By default, that is UTF-8.
 
 The second form of the @code{fopen} function returns a vector of file ids
 corresponding to all the currently open files, excluding the
@@ -624,8 +623,7 @@
   octave_value arch = (nargin > 2) ? args(2) : octave_value ("native");
 
   input_system& input_sys = interp.get_input_system ();
-  octave_value encoding = (nargin > 3) ? args(3)
-                          : octave_value (input_sys.mfile_encoding ());
+  octave_value encoding = (nargin > 3) ? args(3) : octave_value ("utf-8");
   if (encoding.string_value () == "system")
     encoding = octave_value (octave_locale_charset_wrapper ());