bugGNU Octave - Bugs: bug #59560, HZ encoded files are not correctly...

 
 

bug #59560: HZ encoded files are not correctly read

Submitted by:  Markus Mützel <mmuetzel>
Submitted on:  Fri 27 Nov 2020 01:58:50 PM UTC  
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 27 Nov 2020 01:58:50 PM UTC, original submission:  

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)

Markus Mützel <mmuetzel>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #50354:  test_hz_gb_2312.m added by mmuetzel (6B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-27 mmuetzel Attached File- => Added test_hz_gb_2312.m, #50354

    Back to the top


    Powered by Savane 3.5