bugGNU Octave - Bugs: bug #62573, typing/pasting a font character...

 
 

bug #62573: typing/pasting a font character freezes command window

Submitter:  Espirit <espirit90>
Submitted:  Fri 03 Jun 2022 07:21:16 AM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  AJKool Open/Closed:  * Closed
Release:  * 7.1.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 03 Jun 2022 03:01:21 PM UTC, comment #3: 

sorry, I forgot to mention that the ^Z is the the 'Control+Z' key combination used to signal the end of the copy con command and write the file.
Also adding a dependency on bug #59495 which is specific about pasting 'bad' characters freezing the GUI, vs just improper display.

Nicholas Jankowski <nrjank>
Group Member
Fri 03 Jun 2022 02:44:06 PM UTC, comment #2: 

As this has been around for a while, I have found a few workarounds that may help you with your immediate course needs.

I have noticed that text that is problematic for the GUI sometimes can be copy/pasted without issue into the Octave CLI, as it just uses the windows terminal directly. (I think the windows installer still creates an Octave CLI shortcut, if not you just add --no-gui to the startup command.)

E.g., using your document, the code block for Computer Exercise 5.2:


% filter coefficients
h=0.5.^[0:4]’;
% generate input signal
u=randn(1000,1);
% generate desired signal by filtering
d=conv(h,u);
% RLS
[xi,w]=rls(1,5,u,d,0.005);


causes the GUI command window to become unresponsive, likely because of the ’ in the first line.  however, pasting it into the command line when running octave from the CLI produces:


octave:2> % filter coefficients
octave:2> h=0.5.^[0:4]';
octave:3> % generate input signal
octave:3> u=randn(1000,1);
octave:4> % generate desired signal by filtering
octave:4> d=conv(h,u);
octave:5> % RLS
octave:5> [xi,w]=rls(1,5,u,d,0.005)
...


note that the windows terminal automatically converted the ’ into a ', and the code runs (assuming you remembered to load the communications package first of course).

if you really need to use the gui, you need to capture all 'bad' characters and convert them first. this can be done manually, which would be tedious. again, you can also often use the windows terminal to 'filter out' the bad characaters.  First, use the 'copy con' command to save free text input to a text file, then display the input in a filtered form. E.g.:


C:\> copy con testfile.txt
% filter coefficients
h=0.5.^[0:4]’;
% generate input signal
u=randn(1000,1);
% generate desired signal by filtering
d=conv(h,u);
% RLS
[xi,w]=rls(1,5,u,d,0.005)
^Z
      1 file copied.

C:\> type testfile.txt
% filter coefficients
h=0.5.^[0:4]';
% generate input signal
u=randn(1000,1);
% generate desired signal by filtering
d=conv(h,u);
% RLS
[xi,w]=rls(1,5,u,d,0.005)


note that the windows terminal converted the ’ into a '.  this can then be copy/pasted into the GUI without problem.

I haven't used this extensively enough to know whether it might let through any characters that would be problematic for the GUI, but it's generally worked for me over the past couple years when trying code examples from various sources, and doesn't require anything not already present on your system, assuming you have access to a Windows command prompt (Start menu, search for CMD).

Nicholas Jankowski <nrjank>
Group Member
Fri 03 Jun 2022 08:21:43 AM UTC, comment #1: 

This is a duplicate of the long-standing bug #47571.
The Windows console host (that is used under the hood for the command window widget on Windows) crashes when it receives non-ASCII characters. That renders the widget unresponsive.
It will hopefully be fixed when the new implementation of the cross-platform command window widget is in a more complete shape.

Closing as duplicate.

Markus Mützel <mmuetzel>
Group administrator
Fri 03 Jun 2022 07:21:16 AM UTC, original submission:  

When entering code from this document (https://www.eit.lth.se/fileadmin/eit/courses/ett042/CE/CE5e.pdf) the command window freezes.

This is caused by the ' character that seems to be of a different font: ’ vs '.


Espirit <espirit90>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Carbon-Copy List
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by espirit90 (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-06-03 nrjank Dependencies- Depends on bugs #59495
    2022-06-03 mmuetzel StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #47571

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code