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

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

[Octave-bug-tracker] [bug #59560] HZ encoded files are not correctly rea


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #59560] HZ encoded files are not correctly read
Date: Fri, 27 Nov 2020 08:58:52 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36 Edg/87.0.664.47

URL:
  <https://savannah.gnu.org/bugs/?59560>

                 Summary: HZ encoded files are not correctly read
                 Project: GNU Octave
            Submitted by: mmuetzel
            Submitted on: Fri 27 Nov 2020 02:58:50 PM CET
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

As reported on discourse [1], files that are saved with Octave's editor
encoded in HZ-GB-2312 [2] lead to a syntax error on execution (when they start
with an ASCII character which a valid .m file always needs to).

Steps to reproduce with the attached file:

>> __mfile_encoding__ ('HZ-GB-2312')
>> test_hz_gb_2312
parse error near line 1 of file D:\SVN\Octave\test_hz_gb_2312.m

  syntax error

>>> ?}1;
    ^


I'm not sure if the error is on encoding (i.e. the file shouldn't start with
"~}" [0x7E 0x7D] in the first place) or on decoding the file.

[1]: https://octave.discourse.group/t/no-text-on-script-syntax-error/465
[2]: https://en.wikipedia.org/wiki/HZ_(character_encoding)




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 27 Nov 2020 02:58:50 PM CET  Name: test_hz_gb_2312.m  Size: 6B   By:
mmuetzel

<http://savannah.gnu.org/bugs/download.php?file_id=50354>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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