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

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

[Octave-bug-tracker] [bug #65546] m-files (scripts) created with 6.4.0 a


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #65546] m-files (scripts) created with 6.4.0 and 8.3.0 lead to encoding error when opening in 9.1.0
Date: Tue, 2 Apr 2024 04:44:30 -0400 (EDT)

Update of bug #65546 (group octave):

                  Status:                    None => Invalid / Not an Octave
Bug
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #5:

UTF-8 and CP1252 "happen" to share the same first 128 code points (which are
also standardized as US-ASCII).
The file you attached contains the non-ASCII character "±" which is encoded
as 0xB1 in CP1252. That is an invalid character sequence in UTF-8. That's the
reason why you are seeing the error message when you try and open that file in
Octave while the character encoding is set to "UTF-8".

I'd really recommend setting the default encoding in Octave to "UTF-8" and
converting your files from CP1252 to UTF-8. You could do that, e.g., by using
Notepad++ which you'll find in the "mingw64/bin" folder of your Octave
installation or by using another installation of Notepad++. Alternatively, you
could use a command line tool like iconv.
For the latter option see, e.g., this comment on the Discourse forum:
https://octave.discourse.group/t/unreadable-output-when-typing-help-in-the-command-window-looking-for-documentation/5360/20

Anyway. What you are describing is the expected behavior when you try to open
a .m file that contains byte-sequences that are not supported in the currently
selected encoding.

Closing report as invalid.



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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