transposing comma problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

transposing comma problem

Hamed Shakouri
Hi there,

Thanks to the OCTAVE team for providing a light efficient computing environment.

I noticed that in version 6 ahead, the comma character cannot be recognized well.
There was not any problem with that in versions 5 and 4, since I started working with OCTAVE. 

Would you please help me realize a solution?

With Regards,

Hamed Shakouri G.
Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

Octave - Maintainers mailing list
On Fri, 2021-04-30 at 13:13 -0700, Hamed Shakouri wrote:

> Hi there,
>
> Thanks to the OCTAVE team for providing a light efficient computing
> environment.
>
> I noticed that in version 6 ahead, the comma character cannot be
> recognized well.
> There was not any problem with that in versions 5 and 4, since I
> started working with OCTAVE. 
>
> Would you please help me realize a solution?
>
> With Regards,
>
> Hamed Shakouri G.

Hello Hamed,

Could you please be a little more specific what the exact problem is? Is
the comma hard to read? If yes, is this the case in the command widget
and/or in the editor? Does it help to select another font?

Torsten



Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

nrjank
Administrator
In reply to this post by Hamed Shakouri
I noticed that in version 6 ahead, the comma character cannot be recognized well.
There was not any problem with that in versions 5 and 4, since I started working with OCTAVE. 

can you please provide a complete example so that we can try to reproduce the problem that you see?
Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

Hamed Shakouri
In reply to this post by Octave - Maintainers mailing list
Thank you for your fast reply.
Sorry, by "comma" I meant "apostrophe" that is used for transposing.
On my laptop, sometimes OCTAVE 6.2 Editor cannot detect this character correctly.
e.g. x = (1:10)';  used in a function is not read as is written and a syntax error appears.
 syntax error 
>>> x=(1:10);
                    ^
Also, it cannot be used to define a string variable. Seems that the character is not read at all!
e.g. legend({'Res', 'Comm'})  causes:
 syntax error
>>> legend({Res....
                    ^

 Thank you,
Hamed.

On Fri, Apr 30, 2021 at 1:39 PM Torsten Lilge <[hidden email]> wrote:
On Fri, 2021-04-30 at 13:13 -0700, Hamed Shakouri wrote:
> Hi there,
>
> Thanks to the OCTAVE team for providing a light efficient computing
> environment.
>
> I noticed that in version 6 ahead, the comma character cannot be
> recognized well.
> There was not any problem with that in versions 5 and 4, since I
> started working with OCTAVE. 
>
> Would you please help me realize a solution?
>
> With Regards,
>
> Hamed Shakouri G.

Hello Hamed,

Could you please be a little more specific what the exact problem is? Is
the comma hard to read? If yes, is this the case in the command widget
and/or in the editor? Does it help to select another font?

Torsten




--

With Regards,

Hamed Shakouri G.
Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

Hamed Shakouri
Interesting is that when I try to run the lines including these apostrophes by F9 (Run the selection) from the file, it runs with no error. 
I realized that "sometimes" in my last email means when running the entire saved script/function.

On Fri, Apr 30, 2021 at 2:31 PM Hamed Shakouri <[hidden email]> wrote:
Thank you for your fast reply.
Sorry, by "comma" I meant "apostrophe" that is used for transposing.
On my laptop, sometimes OCTAVE 6.2 Editor cannot detect this character correctly.
e.g. x = (1:10)';  used in a function is not read as is written and a syntax error appears.
 syntax error 
>>> x=(1:10);
                    ^
Also, it cannot be used to define a string variable. Seems that the character is not read at all!
e.g. legend({'Res', 'Comm'})  causes:
 syntax error
>>> legend({Res....
                    ^

 Thank you,
Hamed.

On Fri, Apr 30, 2021 at 1:39 PM Torsten Lilge <[hidden email]> wrote:
On Fri, 2021-04-30 at 13:13 -0700, Hamed Shakouri wrote:
> Hi there,
>
> Thanks to the OCTAVE team for providing a light efficient computing
> environment.
>
> I noticed that in version 6 ahead, the comma character cannot be
> recognized well.
> There was not any problem with that in versions 5 and 4, since I
> started working with OCTAVE. 
>
> Would you please help me realize a solution?
>
> With Regards,
>
> Hamed Shakouri G.

Hello Hamed,

Could you please be a little more specific what the exact problem is? Is
the comma hard to read? If yes, is this the case in the command widget
and/or in the editor? Does it help to select another font?

Torsten




--

With Regards,

Hamed Shakouri G.


--

With Regards,

Hamed Shakouri G.
Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

Hamed Shakouri
One more issue I figured out is that the same character (between the key ; and Enter) used in files edited with the previous version (OCTAVE 5) does not appear as it appears as a normal apostrophe; instead, it shows in a different shape, and when I try to get the character number (by abs('<character>') it causes the command window to hang (stops working).  

On Fri, Apr 30, 2021 at 2:38 PM Hamed Shakouri <[hidden email]> wrote:
Interesting is that when I try to run the lines including these apostrophes by F9 (Run the selection) from the file, it runs with no error. 
I realized that "sometimes" in my last email means when running the entire saved script/function.

On Fri, Apr 30, 2021 at 2:31 PM Hamed Shakouri <[hidden email]> wrote:
Thank you for your fast reply.
Sorry, by "comma" I meant "apostrophe" that is used for transposing.
On my laptop, sometimes OCTAVE 6.2 Editor cannot detect this character correctly.
e.g. x = (1:10)';  used in a function is not read as is written and a syntax error appears.
 syntax error 
>>> x=(1:10);
                    ^
Also, it cannot be used to define a string variable. Seems that the character is not read at all!
e.g. legend({'Res', 'Comm'})  causes:
 syntax error
>>> legend({Res....
                    ^

 Thank you,
Hamed.

On Fri, Apr 30, 2021 at 1:39 PM Torsten Lilge <[hidden email]> wrote:
On Fri, 2021-04-30 at 13:13 -0700, Hamed Shakouri wrote:
> Hi there,
>
> Thanks to the OCTAVE team for providing a light efficient computing
> environment.
>
> I noticed that in version 6 ahead, the comma character cannot be
> recognized well.
> There was not any problem with that in versions 5 and 4, since I
> started working with OCTAVE. 
>
> Would you please help me realize a solution?
>
> With Regards,
>
> Hamed Shakouri G.

Hello Hamed,

Could you please be a little more specific what the exact problem is? Is
the comma hard to read? If yes, is this the case in the command widget
and/or in the editor? Does it help to select another font?

Torsten




--

With Regards,

Hamed Shakouri G.


--

With Regards,

Hamed Shakouri G.


--

With Regards,

Hamed Shakouri G.
Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

apjanke-floss
In reply to this post by nrjank


On 4/30/21 5:08 PM, Nicholas Jankowski wrote:
>     I noticed that in version 6 ahead, the comma character cannot be
>     recognized well.
>     There was not any problem with that in versions 5 and 4, since I
>     started working with OCTAVE. 
>
> can you please provide a complete example so that we can try to
> reproduce the problem that you see?


This is one of the rare cases where a screenshot would be nice, too:
Could we get a copy of your source code file, plus a screenshot showing
how the apostrophe appears to you in your Octave 6?

What OS are you running on?

Cheers,
Andrew

Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

Octave - Maintainers mailing list
In reply to this post by Hamed Shakouri
On Fri, 2021-04-30 at 14:38 -0700, Hamed Shakouri wrote:
> Interesting is that when I try to run the lines including
> these apostrophes by F9 (Run the selection) from the file, it runs
> with no error. 
> I realized that "sometimes" in my last email means when running the
> entire saved script/function.

This looks as if there is a mismatch between the character encoding of
the gui and the interpreter. What do the commands

__mfile_encoding__
__locale_charset__

in the octave console give for you?

Torsten


Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

Hamed Shakouri
In reply to this post by apjanke-floss
image.png

On Fri, Apr 30, 2021 at 3:59 PM Andrew Janke <[hidden email]> wrote:


On 4/30/21 5:08 PM, Nicholas Jankowski wrote:
>     I noticed that in version 6 ahead, the comma character cannot be
>     recognized well.
>     There was not any problem with that in versions 5 and 4, since I
>     started working with OCTAVE. 
>
> can you please provide a complete example so that we can try to
> reproduce the problem that you see?


This is one of the rare cases where a screenshot would be nice, too:
Could we get a copy of your source code file, plus a screenshot showing
how the apostrophe appears to you in your Octave 6?

What OS are you running on?

Cheers,
Andrew


--

With Regards,

Hamed Shakouri G.
Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

Hamed Shakouri
In reply to this post by Octave - Maintainers mailing list
image.png
image.png


On Sat, May 1, 2021 at 12:33 AM Torsten Lilge <[hidden email]> wrote:
On Fri, 2021-04-30 at 14:38 -0700, Hamed Shakouri wrote:
> Interesting is that when I try to run the lines including
> these apostrophes by F9 (Run the selection) from the file, it runs
> with no error. 
> I realized that "sometimes" in my last email means when running the
> entire saved script/function.

This looks as if there is a mismatch between the character encoding of
the gui and the interpreter. What do the commands

__mfile_encoding__
__locale_charset__

in the octave console give for you?

Torsten



--

With Regards,

Hamed Shakouri G.
Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

Hamed Shakouri
Moreover, when I opened the file saved by ver. 6.2 in ver. 5.2, the character is replaced with (c) character:
image.png

On Sat, May 1, 2021 at 2:56 AM Hamed Shakouri <[hidden email]> wrote:
image.png
image.png


On Sat, May 1, 2021 at 12:33 AM Torsten Lilge <[hidden email]> wrote:
On Fri, 2021-04-30 at 14:38 -0700, Hamed Shakouri wrote:
> Interesting is that when I try to run the lines including
> these apostrophes by F9 (Run the selection) from the file, it runs
> with no error. 
> I realized that "sometimes" in my last email means when running the
> entire saved script/function.

This looks as if there is a mismatch between the character encoding of
the gui and the interpreter. What do the commands

__mfile_encoding__
__locale_charset__

in the octave console give for you?

Torsten



--

With Regards,

Hamed Shakouri G.


--

With Regards,

Hamed Shakouri G.
Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

Hamed Shakouri
In reply to this post by apjanke-floss
Thanks to all the maintainers.

** What OS are you running on?
Windows 10. 
** how the apostrophe appears to you in your Octave 6?
When I type in its editor it seems normal. But when I run the entire file, it leads to a syntax error. 
Also if I open a file saved by the previous version (5) the apostrophe's shape differs. 


On Fri, Apr 30, 2021 at 3:59 PM Andrew Janke <[hidden email]> wrote:


On 4/30/21 5:08 PM, Nicholas Jankowski wrote:
>     I noticed that in version 6 ahead, the comma character cannot be
>     recognized well.
>     There was not any problem with that in versions 5 and 4, since I
>     started working with OCTAVE. 
>
> can you please provide a complete example so that we can try to
> reproduce the problem that you see?


This is one of the rare cases where a screenshot would be nice, too:
Could we get a copy of your source code file, plus a screenshot showing
how the apostrophe appears to you in your Octave 6?

What OS are you running on?

Cheers,
Andrew


--

With Regards,

Hamed Shakouri G.
Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

apjanke-floss
In reply to this post by Hamed Shakouri


On 5/1/21 5:59 AM, Hamed Shakouri wrote:
Moreover, when I opened the file saved by ver. 6.2 in ver. 5.2, the character is replaced with (c) character:
image.png

On Sat, May 1, 2021 at 2:56 AM Hamed Shakouri <[hidden email]> wrote:
image.png
image.png



Looks like you've got an encoding/locale problem all right.

Where exactly are you copying this text in to the Octave 6.2 Editor from? Is it a text file open in a text editor? If so, what text editor is it using? Or a web page somewhere? Or are you typing it in directly?

Can you copy and paste (not screenshot) the output of the commands "chcp" and "systeminfo" from the Windows Command Prompt or a PowerShell Prompt?

And then open a PowerShell prompt and run this:

Get-WinSystemLocale | Select-Object LCID, Name, DisplayName, @{ n='OEMCP'; e={ $_.TextInfo.OemCodePage } }, @{ n='ACP';   e={ $_.TextInfo.AnsiCodePage } }

and paste the output here.

(See this ServerFault answer for context: https://serverfault.com/a/836221)

By the way, that hang on "abs('character')" is really weird.

Cheers,
Andrew
Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

John Frain
Many years ago I encountered this problem with scripts copied from pdf files

On Sun, 2 May 2021, 00:48 Andrew Janke, <[hidden email]> wrote:


On 5/1/21 5:59 AM, Hamed Shakouri wrote:
Moreover, when I opened the file saved by ver. 6.2 in ver. 5.2, the character is replaced with (c) character:


On Sat, May 1, 2021 at 2:56 AM Hamed Shakouri <[hidden email]> wrote:




Looks like you've got an encoding/locale problem all right.

Where exactly are you copying this text in to the Octave 6.2 Editor from? Is it a text file open in a text editor? If so, what text editor is it using? Or a web page somewhere? Or are you typing it in directly?

Can you copy and paste (not screenshot) the output of the commands "chcp" and "systeminfo" from the Windows Command Prompt or a PowerShell Prompt?

And then open a PowerShell prompt and run this:

Get-WinSystemLocale | Select-Object LCID, Name, DisplayName, @{ n='OEMCP'; e={ $_.TextInfo.OemCodePage } }, @{ n='ACP';   e={ $_.TextInfo.AnsiCodePage } }

and paste the output here.

(See this ServerFault answer for context: https://serverfault.com/a/836221)

By the way, that hang on "abs('character')" is really weird.

Cheers,
Andrew

image.png (8K) Download Attachment
image.png (17K) Download Attachment
image.png (30K) Download Attachment
image.png (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

John Frain
Many years ago I had the same problem with scripts copied from pdf files for use in various programs.  The problem was that the encoding used for ', ^, and several other symbols was different to those used on my PC. To correct I just used cut and paste.  I did something in my Latex files to minimise the problem in my lecture notes but can not recall exactly what I did

On Sun, 2 May 2021, 17:24 John Frain, <[hidden email]> wrote:
Many years ago I encountered this problem with scripts copied from pdf files

On Sun, 2 May 2021, 00:48 Andrew Janke, <[hidden email]> wrote:


On 5/1/21 5:59 AM, Hamed Shakouri wrote:
Moreover, when I opened the file saved by ver. 6.2 in ver. 5.2, the character is replaced with (c) character:
image.png

On Sat, May 1, 2021 at 2:56 AM Hamed Shakouri <[hidden email]> wrote:
image.png
image.png



Looks like you've got an encoding/locale problem all right.

Where exactly are you copying this text in to the Octave 6.2 Editor from? Is it a text file open in a text editor? If so, what text editor is it using? Or a web page somewhere? Or are you typing it in directly?

Can you copy and paste (not screenshot) the output of the commands "chcp" and "systeminfo" from the Windows Command Prompt or a PowerShell Prompt?

And then open a PowerShell prompt and run this:

Get-WinSystemLocale | Select-Object LCID, Name, DisplayName, @{ n='OEMCP'; e={ $_.TextInfo.OemCodePage } }, @{ n='ACP';   e={ $_.TextInfo.AnsiCodePage } }

and paste the output here.

(See this ServerFault answer for context: https://serverfault.com/a/836221)

By the way, that hang on "abs('character')" is really weird.

Cheers,
Andrew
Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

Hamed Shakouri
Answers to all questions:

* As it is shown by screenshots, is clear that I am using 6.2 (and 5.2) Editors to implement codes.
* Certainly, I do not copy from a pdf. I am writing (typing) inside the Editor directly. 
* error: 'chcp' undefined near line 1, column 1
* PowerShell Output:
image.png
No error.
* Hanging when trying to recognize the character code occurs every time (several times).

Thanks,
Hamed.



On Sun, May 2, 2021 at 9:32 AM John Frain <[hidden email]> wrote:
Many years ago I had the same problem with scripts copied from pdf files for use in various programs.  The problem was that the encoding used for ', ^, and several other symbols was different to those used on my PC. To correct I just used cut and paste.  I did something in my Latex files to minimise the problem in my lecture notes but can not recall exactly what I did

On Sun, 2 May 2021, 17:24 John Frain, <[hidden email]> wrote:
Many years ago I encountered this problem with scripts copied from pdf files

On Sun, 2 May 2021, 00:48 Andrew Janke, <[hidden email]> wrote:


On 5/1/21 5:59 AM, Hamed Shakouri wrote:
Moreover, when I opened the file saved by ver. 6.2 in ver. 5.2, the character is replaced with (c) character:
image.png

On Sat, May 1, 2021 at 2:56 AM Hamed Shakouri <[hidden email]> wrote:
image.png
image.png



Looks like you've got an encoding/locale problem all right.

Where exactly are you copying this text in to the Octave 6.2 Editor from? Is it a text file open in a text editor? If so, what text editor is it using? Or a web page somewhere? Or are you typing it in directly?

Can you copy and paste (not screenshot) the output of the commands "chcp" and "systeminfo" from the Windows Command Prompt or a PowerShell Prompt?

And then open a PowerShell prompt and run this:

Get-WinSystemLocale | Select-Object LCID, Name, DisplayName, @{ n='OEMCP'; e={ $_.TextInfo.OemCodePage } }, @{ n='ACP';   e={ $_.TextInfo.AnsiCodePage } }

and paste the output here.

(See this ServerFault answer for context: https://serverfault.com/a/836221)

By the way, that hang on "abs('character')" is really weird.

Cheers,
Andrew


--

With Regards,

Hamed Shakouri G.
Reply | Threaded
Open this post in threaded view
|

Re: transposing comma problem

Hamed Shakouri
Hi there,

Thanks to all the OCTAVE developers.
I had posted this suggestion before (when I started working with OCTAVE 4).
Please consider defining Escape key for deleting the entire line in the command window.
I can explain why this is important, if you are interested.

Thank you,
Hamed. 

On Mon, May 3, 2021 at 10:04 AM Hamed Shakouri <[hidden email]> wrote:
Hi there,

Thank you for your help.
Yesterday I removed a few software from my laptop and reinstalled them (Anaconda, Spyder, Jupyter, ...whatever I had a problem with).
Many files related to these I deleted before reinstallation too.
It seems the problem with running the scripts/functions is resolved.
However, the character of apostrophe conveyed in files edited in version 5.2 appear in a different shape yet:
image.png
And still when I try char(<the character>) in the command line, it hangs.
The attached file is the one used to stop at the first transposing character.
 
The command chcp results in:
Active code page: 437

By the way, I suggest to the developing team to modify the line editor of the command window so that with the escape key one can delete the entire current line.
Thanks, 
Hamed.

On Sun, May 2, 2021 at 11:25 PM Markus Mützel <[hidden email]> wrote:
Am 03. Mai 2021 um 08:07 Uhr schrieb "Hamed Shakouri":
> Answers to all questions:

> * As it is shown by screenshots, is clear that I am using 6.2 (and 5.2) Editors to implement codes.
> * Certainly, I do not copy from a pdf. I am writing (typing) inside the Editor directly. 
> * error: 'chcp' undefined near line 1, column 1
> * PowerShell Output:
>
> No error.
> * Hanging when trying to recognize the character code occurs every time (several times).
>
> Thanks,
> Hamed.

IIUC, Andrew's commands were meant to be run in a *PowerShell prompt*. Not from inside Octave.

Could you please attach a short .m file that doesn't run for you?

Markus

PS: I'm moving this to the help mailing list. The maintainers mailing list is thought for discussions about Octave development.



--

With Regards,

Hamed Shakouri G.


--

With Regards,

Hamed Shakouri G.