bugGNU Octave - Bugs: bug #52574, Byte-order-mark handling

 
 

bug #52574: Byte-order-mark handling

Submitter:  Ben Cox <mitlik>
Submitted:  Fri 01 Dec 2017 08:30:03 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 03 Aug 2018 07:07:29 PM UTC, comment #2: 

Closing as fixed.

Markus Mützel <mmuetzel>
Group administrator
Sat 14 Jul 2018 12:19:20 PM UTC, comment #1: 

The issue should be fixed on the development branch with this changeset:
http://hg.savannah.gnu.org/hgweb/octave/rev/467729037209

Marking as Ready for Test.

Markus Mützel <mmuetzel>
Group administrator
Fri 01 Dec 2017 08:30:03 PM UTC, original submission:  

Octave interpreter gives syntax error while running script files that begin with a byte-order-mark (BOM).

Operating System: Windows 7 Professional 32-bit [Version 6.1.7601]
Octave Information: 4.2.1 configured for "i686-w64-mingw32" (i.e. installed from the windows installer available through the Octave website)

  •  called using "C:\Octave\Octave-4.2.1\octave.vbs --force-gui"


To reproduce modify any working script to include a BOM. In vim that would look like:

vim -u /dev/null --noplugin <file>
:set fileencoding=utf-8 bomb
:write
:quit


Alternately, in Notepad it is possible to Save As with UTF-8 encoding, which defaults to putting a byte-order-mark in place.

After the BOM is added, the octave interpreter will throw a syntax error on the BOM.

Example contents of "bomtest.m":

# Comment
printf("Test\n");


Example run and output (using the Octave GUI, octave-cli doesn't show characters in the syntax error):

>> bomtest
parse error near line 1 of file bomtest.m

  syntax error

>>> # Comment


Ben Cox <mitlik>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-03 mmuetzel StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2018-07-14 mmuetzel Release4.2.1 dev
        Operating SystemMicrosoft Windows Any
    2018-07-14 mmuetzel StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code