help-octave
[Top][All Lists]
Advanced

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

Re: parse error


From: Ian McCallion
Subject: Re: parse error
Date: Wed, 29 Apr 2020 14:18:04 +0100

On Tue, 28 Apr 2020 at 18:18, martin schatzmayr <address@hidden> wrote:

 

Gesendet von Mail für Windows 10

 

Von: Ian McCallion
Gesendet: Tuesday, 28 April 2020 18:47
An: martin schatzmayr
Cc: Nicholas Jankowski; Help GNU Octave
Betreff: Re: parse error

 

On Tue, 28 Apr 2020 at 17:30, martin schatzmayr <address@hidden> wrote:

 

 

Gesendet von Mail für Windows 10

 

Von: Ian McCallion
Gesendet: Tuesday, 28 April 2020 16:57
An: Nicholas Jankowski
Cc: martin schatzmayr; Help GNU Octave
Betreff: Re: parse error

 

On Tuesday, 28 April 2020, Nicholas Jankowski <address@hidden> wrote:

Used buil-in-editor  to create same code –  on running I had the  same issue . When I open the file ami.m I see the expected code . I have uninstalled  octave and reinstalled it again  ( octave 5.2.0 -w64-installer.exe)  still no change

 

Please always Reply All to keep the mailing list copied. 

 

So just to be clear, you have used both notepad++ and the built-in Octave editor to create the same file, and get the same non-ascii output from _both_ programs? But only after saving the file? And if you open the same file in both programs you see the expected code not the garbage characters I saw?  

 

For notepad++, are you using the version that comes with Octave or do you have another version installed?

 

If it does the same in both Notepad++ and also the Octave Editor, what happens if you try saving it in another program like the Windows Notepad text editor? What happens when Octave tries to run it? What do you see if you open a file saved in Octave's editor in Windows Notepad?

 

Within Octave, also confirming: if you type the text, save it, and press F5 to run it, do you get the same error?

 

Are you using any non-default Windows Language or Keyboard settings?

 

Martin,

 

Please zip and upload the file you created. That should ensure it is not codepage translated during the transfer and will allow us to inspect it.

 

Cheers Ian

 

Hi

I have created this file with the built-in-editor of octave. As suggested the file is zipped

So the problem is codepage-related. Please open a powershell window and type:

 

    [System.Text.Encoding]::Default

 

And tell us what you obtain.

 

Ian

 

That is the output:

 

PS C:\Users\Martin Schatzmayr>  [System.Text.Encoding]::Default

 

 

IsSingleByte      : True

BodyName          : iso-8859-1

EncodingName      : Western European (Windows)

HeaderName        : Windows-1252

WebName           : Windows-1252

WindowsCodePage   : 1252

IsBrowserDisplay  : True

IsBrowserSave     : True

IsMailNewsDisplay : True

IsMailNewsSave    : True

EncoderFallback   : System.Text.InternalEncoderBestFitFallback

DecoderFallback   : System.Text.InternalDecoderBestFitFallback

IsReadOnly        : True

CodePage          : 1252


This is identical to what I receive, which suggests that in some circumstances Octave and notepad++ editors choose the wrong encoding based on something else. Another possibly relevant internationalisation setting in windows is:

        Get-WinSystemLocale

which returns the LCID as defined in http://www.rfc-editor.org/rfc/bcp/bcp47.txt. I get this:

   LCID          Name         DisplayName
   ----          ----         -----------
   2057          en-GB        English (United Kingdom)


Regarding how to get you using Octave,:

1. Have you tried creating files using the windows notepad editor?
2. Try copying and pasting from the Octave command window to the editor window and saving as a .m file and running.

Hoping something here is helpful!

Cheers... Ian

Last possibility

reply via email to

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