# HG changeset patch # User Markus Mützel # Date 1593251982 -7200 # Node ID 6bd9d77c7105cc0509759142939041ccda9c3805 # Parent d747d57989e2186b8c0ddb670c2f5e350bb8696c Document that startup files are interpreted in the locale charset (bug #57235). * doc/interpreter/basics.txi (Startup Files): Document that startup files are interpreted in the locale charset initially. diff -r d747d57989e2 -r 6bd9d77c7105 doc/interpreter/basics.txi --- a/doc/interpreter/basics.txi Fri Jun 26 13:57:04 2020 -0700 +++ b/doc/interpreter/basics.txi Sat Jun 27 11:59:42 2020 +0200 @@ -392,6 +392,22 @@ invoke Octave with the @option{--verbose} option but without the @option{--silent} option. +The startup files are always processes in the system's locale charset +(independent of the .m file encoding that is set e.g. in the GUI properties). +That is until a user manually sets the .m file encoding (e.g. in one of the +startup files) and triggers re-parsing the .m files. This can be done with the +undocumented core function @code{__mfile_encoding__}: + +@example +@group +__mfile_encoding__ ("utf-8"); # set new encoding +clear ("functions"); # re-parse all .m files in the new encoding +@end group +@end example + +This changes the encoding that is used to interpret all subsequently run startup +and .m files (not including the currently executing file). + @node Quitting Octave @section Quitting Octave @cindex exiting octave