bugGNU Octave - Bugs: bug #56224, [Windows] Displaying char([194...

 
 

bug #56224: [Windows] Displaying char([194 160]) causes all following commands to result in just a prompt

Submitter:  Richard Suchland <suchland>
Submitted:  Fri 26 Apr 2019 11:52:07 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Richard Suchland Open/Closed:  * Closed
Release:  * 5.1.0 Operating System:  * Microsoft Windows
Fixed Release:  8.1.0 Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 12 Apr 2023 09:31:45 PM UTC, comment #14: 

Closing report as fixed.

Rik <rik5>
Group administrator
Wed 30 Nov 2022 04:38:29 PM UTC, comment #13: 

GUI:  arrow keys to move up and down through command history works fine both before and after the subject bug is triggered.  up/down arrows for command completion (start typing a few characters, up arrow jumps back to last matching command) works fine.

CLI: can't trigger the bug (output display stays fine even after displaying chars causing gui problems).  up and down arrows step through command history fine.  up/down arrows for command completion work fine (i think this might be an improvement, i seem to recall no command completion, just stepping through history, in past CLI implementations)

Nicholas Jankowski <nrjank>
Group Member
Wed 30 Nov 2022 11:05:56 AM UTC, comment #12: 

IIUC, the byte sequences that break the console on Windows 10 (and earlier) are either invalid UTF-8 byte sequences or some other special characters (e.g., char([194 160]) is the NO-BREAK SPACE).

I'm inclined to think that the console host didn't handle that kind of input gracefully in those versions of Windows. In Windows 11, those invalid byte sequences result in the REPLACEMENT CHARACTER � being displayed.

There's probably not much we can do about this (short of implementing some kind of "string sanitizer" before sending those sequences to the console). But I guess this error would disappear with the new cross-platform command widget.

Btw: Do the arrow keys still work in the GUI and the CLI with that version of Octave?

Markus Mützel <mmuetzel>
Group administrator
Tue 29 Nov 2022 06:58:03 PM UTC, comment #11: 

sorry, yes. I downloaded octave-2022-11-29-00-11-default-w64.7z

Nicholas Jankowski <nrjank>
Group Member
Tue 29 Nov 2022 06:10:17 PM UTC, comment #10: 

Was that with a build from the mxe-default category of the download page (i.e., not "w32", not "w64", and also not "w64-64")?

Markus Mützel <mmuetzel>
Group administrator
Tue 29 Nov 2022 05:48:04 PM UTC, comment #9: 

checking some of the others mentioned below:

normal behavior:

char(194)
char([194 160])
char(226)
char([226 150])
char([226 128])
char([226 128])
char([226 129])
char([226 130])
char([226 131])
char([226 132])
char([226 133])
char([226 134])
char([226 135])
char([226 136])
char([226 191])
char([226 0:127])
char([226 0:128])


triggers the bug:

char(150)
char(160)
char([226 137:191])
char([226 0:129])



Nicholas Jankowski <nrjank>
Group Member
Tue 29 Nov 2022 05:25:30 PM UTC, comment #8: 

On windows 10 with GNU Octave Version: 8.0.1 (hg id: 017ec2d748f7):


>> whos
>> a = 1
a = 1
>> whos
Variables visible from the current scope:

variables in scope: top scope

  Attr   Name        Size                     Bytes  Class
  ====   ====        ====                     =====  =====
         a           1x1                          8  double

Total is 1 element using 8 bytes

>> a
a = 1
>> char(150)
ans = >> whos
>> whos
>> 1+1
>> a
>>


seems the behavior persists

Nicholas Jankowski <nrjank>
Group Member
Tue 29 Nov 2022 11:28:36 AM UTC, comment #7: 

Could anyone affected by this bug please check if it still occurs with a recent nightly build of Octave from the mxe-default category:
https://buildbot.octave.space/#/download

In particular, it would be interesting to hear if the arrow keys are still working to access the history (in the GUI and in the CLI). Additionally, does entering non-ASCII characters in the command window widget of the GUI work correctly? Does it still crash the Windows console (i.e., freeze the command window)?

Markus Mützel <mmuetzel>
Group administrator
Sat 04 May 2019 10:04:34 PM UTC, comment #6: 

Did some additional testing with the first character being char(226) and found that:
char([226 0:127]) works
tested and each failed
char([226 128])
char([226 129])
char([226 130])
char([226 131])
char([226 132])
char([226 133])
char([226 134])
char([226 135])
char([226 136])
char([226 191])
I assume 137:190 also fail
char(226 192:255]) worked

Richard Suchland <suchland>
Sat 27 Apr 2019 11:54:55 PM UTC, comment #5: 

I just got the same result displaying char([226 150)] in the GUI but not the CLI.


 variable = 12
 whos variable
 char(226)
 whos variable
 char(150)
 whos variable
 char([226 150])
 whos variable
 variable = 13
 whos variable


Richard Suchland <suchland>
Sat 27 Apr 2019 11:50:57 PM UTC, comment #4: 

Correction to last comment:

Confirmed on Win-7.
after "char([194 160])" there is no output on the screen, but only
in GUI version.

Richard Suchland <suchland>
Sat 27 Apr 2019 09:15:18 PM UTC, comment #3: 

Confirmed on Win-10.
after "char(194)" there is no output on the screen, but only
in GUI version.

Avinoam Kalma <avinoam>
Group Member
Sat 27 Apr 2019 06:12:17 PM UTC, comment #2: 

I tried the CLI version and didn't see the reported problem.

Richard Suchland <suchland>
Sat 27 Apr 2019 04:55:27 PM UTC, comment #1: 

Testing on Linux is just fine.  This probably indicates that it is the Terminal Emulator in the Command Window which differs between platforms.

What happens if you run the CLI version of Octave rather than the GUI?

Rik <rik5>
Group administrator
Fri 26 Apr 2019 11:52:07 PM UTC, original submission:  

After executing char([194 160]) all subsequent commands result in the >> prompt only.  The workspace window does show the proper result.
Here is a test case:

 variable = 12
 whos variable
 char(194)
 whos variable
 char(160)
 whos variable
 char([194 160])
 whos variable
 variable = 13
 whos variable


results:

>> variable =  12

Variables in the current scope:

   Attr Name          Size                     Bytes  Class
   ==== ====          ====                     =====  =====
        variable      1x1                          8  double

Total is 1 element using 8 bytes

ans = �
Variables in the current scope:

   Attr Name          Size                     Bytes  Class
   ==== ====          ====                     =====  =====
        variable      1x1                          8  double

Total is 1 element using 8 bytes

ans = �
Variables in the current scope:

   Attr Name          Size                     Bytes  Class
   ==== ====          ====                     =====  =====
        variable      1x1                          8  double

Total is 1 element using 8 bytes

ans =

>>

Note that only three of the five whos commands get a result.

Note: I found this on version 5.1.0 but checked version 4.2.2 and 4.4.1 with the same result.
Also plotting does create a valid plot.

Richard Suchland <suchland>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by koler
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by suchland (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-04-12 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 8.1.0
    2022-11-29 rik5 Carbon-CopyRemoved 72865 -
    2022-11-29 mmuetzel StatusConfirmed Ready For Test
    2019-10-29 koler Carbon-Copy- Added -email is unavailable-
    2019-04-27 avinoam StatusNeed Info Confirmed
    2019-04-27 rik5 StatusNone Need Info
        SummaryDisplaying char([194 160]) causes all following commands to result in just a prompt [Windows] Displaying char([194 160]) causes all following commands to result in just a prompt

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code