bugGNU Octave - Bugs: bug #56173, Command window does not display...

 
 

bug #56173: Command window does not display Unicode correctly but editor does!

Submitted by:  None
Submitted on:  Fri 19 Apr 2019 09:35:40 PM UTC  
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Confirmed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  5.1.0
Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 04 Jun 2019 03:17:35 PM UTC, comment #1: 

This works for me if I issue the following commands before executing:

__mfile_encoding__ utf-8
clear all
dispcube (1:54)

AFAIK, the encoding used when parsing the .m-files should be synchronized to the one used in the editor. This doesn't seem to happen on start-up of Octave: The editor is set to "UTF-8" but "__mfile_encoding__" returns "system".

CC'ing Torsten because I believe he might better understand what might be going on.

Markus Mützel <mmuetzel>
Project Member
Fri 19 Apr 2019 09:35:40 PM UTC, original submission:  

Windows 10 64-bit, Octave precompiled binary.

This Unicode display error is different from bug #47571 and others, because in this case the editor can display Unicode properly but the command window fails. It's narrower in scope and likely easier to fix.

See below:

Copy-paste from editor:

# function to display a 3x3x3 Rubik's cube as a cube net
function dispcube (p, colors = num2str((1:54)',"%02d")) # p is a permutation, colors = a set of color labels
  assert(length(p) == 54);
  assert(all(sort(p) == (1:54)))
  assert(size(colors,1) == 54);
  colors = colors(p,:);

  fprintf(1, "               ╔════╤════╤════╗\n");
  fprintf(1, "               ║ %s │ %s │ %s ║\n", colors(7,:), colors(8,:), colors(9,:));
  fprintf(1, "               ╟────┼────┼────╢\n");
  fprintf(1, "               ║ %s │ %s │ %s ║\n", colors(4,:), colors(5,:), colors(6,:));
  fprintf(1, "               ╟────┼────┼────╢\n");
  fprintf(1, "               ║ %s │ %s │ %s ║\n", colors(1,:), colors(2,:), colors(3,:));
  fprintf(1, "╔════╤════╤════╬════╪════╪════╬════╤════╤════╦════╤════╤════╗\n");
  fprintf(1, "║ %s │ %s │ %s ║ %s │ %s │ %s ║ %s │ %s │ %s ║ %s │ %s │ %s ║\n", ...
    colors(43,:), colors(40,:), colors(37,:), colors(10,:), colors(13,:), colors(16,:), ...
    colors(19,:), colors(22,:), colors(25,:), colors(34,:), colors(31,:), colors(28,:));
  fprintf(1, "╟────┼────┼────╫────┼────┼────╫────┼────┼────╫────┼────┼────╢\n");
  fprintf(1, "║ %s │ %s │ %s ║ %s │ %s │ %s ║ %s │ %s │ %s ║ %s │ %s │ %s ║\n", ...
    colors(44,:), colors(41,:), colors(38,:), colors(11,:), colors(14,:), colors(17,:), ...
    colors(20,:), colors(23,:), colors(26,:), colors(35,:), colors(32,:), colors(29,:));
  fprintf(1, "╟────┼────┼────╫────┼────┼────╫────┼────┼────╫────┼────┼────╢\n");
  fprintf(1, "║ %s │ %s │ %s ║ %s │ %s │ %s ║ %s │ %s │ %s ║ %s │ %s │ %s ║\n", ...
    colors(45,:), colors(42,:), colors(39,:), colors(12,:), colors(15,:), colors(18,:), ...
    colors(21,:), colors(24,:), colors(27,:), colors(36,:), colors(33,:), colors(30,:));
  fprintf(1, "╚════╧════╧════╬════╪════╪════╬════╧════╧════╩════╧════╧════╝\n");
  fprintf(1, "               ║ %s │ %s │ %s ║\n", colors(46,:), colors(47,:), colors(48,:));
  fprintf(1, "               ╟────┼────┼────╢\n");
  fprintf(1, "               ║ %s │ %s │ %s ║\n", colors(49,:), colors(50,:), colors(51,:));
  fprintf(1, "               ╟────┼────┼────╢\n");
  fprintf(1, "               ║ %s │ %s │ %s ║\n", colors(52,:), colors(53,:), colors(54,:));
  fprintf(1, "               ╚════╧════╧════╝\n");

endfunction

Copy-paste from command window, where the output is garbled:

               â•”â•?â•?â•?â•?╤â•?â•?â•?â•?╤â•?â•?â•?â•?â•—
               â•‘ Wh │ Wh │ Rd â•‘
               ╟────┼────┼────╢
               â•‘ Wh │ Wh │ Bl â•‘
               ╟────┼────┼────╢
               â•‘ Wh │ Gr │ Rd â•‘
╔����╤����╤����╬����╪����╪����╬����╤����╤����╦����╤����╤����╗
║ Gr │ Rd │ Bl ║ Or │ Wh │ Bl ║ Wh │ Wh │ Wh ║ Gr │ Or │ Or ║
╟────┼────┼────╫────┼────┼────╫────┼────┼────╫────┼────┼────╢
║ Rd │ Rd │ Rd ║ Bl │ Bl │ Bl ║ Or │ Or │ Or ║ Gr │ Gr │ Gr ║
╟────┼────┼────╫────┼────┼────╫────┼────┼────╫────┼────┼────╢
║ Rd │ Rd │ Rd ║ Bl │ Bl │ Bl ║ Or │ Or │ Or ║ Gr │ Gr │ Gr ║
╚����╧����╧����╬����╪����╪����╬����╧����╧����╩����╧����╧�����
               â•‘ Yw │ Yw │ Yw â•‘
               ╟────┼────┼────╢
               â•‘ Yw │ Yw │ Yw â•‘
               ╟────┼────┼────╢
               â•‘ Yw │ Yw │ Yw â•‘
               â•šâ•?â•?â•?â•?╧â•?â•?â•?â•?╧â•?â•?â•?â•?â•?

How to make the command window use the same font display settings as the editor?

Anonymous

 

(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 mmuetzel
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-06-04 mmuetzel StatusNone => Confirmed
        Carbon-Copy- => Added ttl

    Back to the top


    Powered by Savane 3.5