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

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

[Octave-bug-tracker] [bug #52574] Byte-order-mark handling


From: Ben Cox
Subject: [Octave-bug-tracker] [bug #52574] Byte-order-mark handling
Date: Fri, 1 Dec 2017 15:30:06 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:57.0) Gecko/20100101 Firefox/57.0

URL:
  <http://savannah.gnu.org/bugs/?52574>

                 Summary: Byte-order-mark handling
                 Project: GNU Octave
            Submitted by: mitlik
            Submitted on: Fri 01 Dec 2017 08:30:03 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

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






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52574>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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