bugGNU Octave - Bugs: bug #65522, "Run selection" does not...

 
 

bug #65522: "Run selection" does not produce the same result as running the script

Submitter:  Charles Praplan <charprap>
Submitted:  Wed 27 Mar 2024 04:28:57 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed 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
   

Mon 15 Apr 2024 05:35:39 PM UTC, comment #1: 

It looks like the string went through the conversion from CP1252 to UTF-8 twice when using F9.

I don't know where that would be happening though...

A potential work-around could be to convert all your .m files to UTF-8. That would also help with compatibility of your files with Octave on Linux or macOS, and with versions of Matlab that aren't older than approx. five years.

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

The execution of a piece of code by pressing F9 (run selection) in the editor does not produce the same result as running the whole script or typing the command the console.
This leads to wrong result.

This only occurs when encoding is not UTF-8 (I only tested with Windows-1252 encoding).

The code to be executed is :   s_xx='é';

Hereafter, the results for the 3 cases (xx = F9, console or script)


>> whos
Variables visible from the current scope:

variables in scope: top scope

  Attr   Name          Size                     Bytes  Class
  ====   ====          ====                     =====  =====
         s_F9          1x4                          4  char
         s_console     1x2                          2  char
         s_script      1x2                          2  char

Total is 8 elements using 8 bytes

>> uint16(s_F9)
ans =

  195  131  194  169

>> uint16(s_console)
ans =

  195  169

>> uint16(s_script)
ans =

  195  169


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.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-04-15 mmuetzel CategoryNone GUI
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-c54d.
    Corresponding source code