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

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

[Octave-bug-tracker] [bug #62573] typing/pasting a font character freeze


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #62573] typing/pasting a font character freezes command window
Date: Fri, 3 Jun 2022 10:44:06 -0400 (EDT)

Follow-up Comment #2, bug #62573 (project octave):

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).


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62573>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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