bugGNU Octave - Bugs: bug #65523, Displaying some invalid UTF-8...

 
 

bug #65523: Displaying some invalid UTF-8 character (for example char(181)) disables the display in the console

Submitter:  Charles Praplan <charprap>
Submitted:  Wed 27 Mar 2024 04:29:02 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Assigned to:  None
Originator Name:  Charles Praplan Open/Closed:  * Open
Release:  * 9.1.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 28 Mar 2024 05:35:47 PM UTC, comment #7: 

Ah. Thanks. That could explain it.

It's probably a good thing that we are emitting a warning in that case, too. (Albeit accidentally.) The legacy console had its issues, too...

Markus Mützel <mmuetzel>
Group administrator
Thu 28 Mar 2024 05:25:06 PM UTC, comment #6: 

When reverting to the original settings, I saw that switching on the legacy console also modified the settings for the windows terminal. So the message that I didn't read carefully is probably for the terminal:

WARNING: You are using an incompatible Windows configuration!
Microsoft's new Terminal App is not compatible with Octave.
Please follow the instructions on the following page and set the default terminal to "Windows Console Host":
https://octave.discourse.group/t/4981/

Charles Praplan <charprap>
Thu 28 Mar 2024 04:08:49 PM UTC, comment #5: 

There is a warning for the legacy console? Could you please show what that warning says?
We recently added a warning for the Windows Terminal. But I wasn't aware there was already a similar check for the legacy console. Maybe, we should move both warnings to the same place...

Markus Mützel <mmuetzel>
Group administrator
Thu 28 Mar 2024 04:05:43 PM UTC, comment #4: 

No I don't use legacy Windows console!

If I try to switch on the legacy console

- I get a warning when I start octave 9.1.0

- char(181) displays the replacement character and this does not break the console (as in your trial)

- BUT special characters cannot be displayed any more in the console.

Charles Praplan <charprap>
Thu 28 Mar 2024 08:25:17 AM UTC, comment #3: 

Do you maybe use the "legacy" Windows console? IIRC, that was even more picky when it comes to Unicode.
See, e.g., bug #55689 that you reported a couple of years ago.

Markus Mützel <mmuetzel>
Group administrator
Wed 27 Mar 2024 05:10:08 PM UTC, comment #2: 

Yes the default console is set to "Windows Console Host".

Hereafter my results for two different calls to char

>> char(233)
ans =
>> a=1
a = 1
>>
>>
>> char(181)
ans = >>
>>
>> a=1
>>


Charles Praplan <charprap>
Wed 27 Mar 2024 04:54:15 PM UTC, comment #1: 

Octave's "base" encoding is UTF-8. `char(181)` is invalid UTF-8.
Having said that: It doesn't break the console for me. It just displays the replacement character ('�'). But the command window widget is still responsive and shows the result of subsequent commands.

>> char(181)
ans = �
>> a = "a"
a = a
>>


Did you set the default console to the "Windows Console Host"? See: https://octave.discourse.group/t/workaround-for-weird-behavior-of-command-window-widget-in-windows/4981

Markus Mützel <mmuetzel>
Group administrator
Wed 27 Mar 2024 04:29:02 PM UTC, original submission:  

Displaying some special character (for example char(181) 'µ') disable the display in the console.

This is independent on the encoding !

Type following command in the console

  s1=char(181)                     -> The display is disabled

This can be checked by typing

a=3 (or help fft or ...).

But typing something undefined displays the error.

Rem : I know that the correct conversion would be char(native2unicode(181, 'Windows-1252')), but char(181) should not affect Octave stability.

Charles Praplan <charprap>

 

(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 mmuetzel (Posted a comment)
  • -email is unavailable- added by charprap (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.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-03-28 mmuetzel SummaryDisplaying some special character (for example char(181) 'µ') disable the display in the console. Displaying some invalid UTF-8 character (for example char(181)) disables the display in the console

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code