bugGNU Octave - Bugs: bug #53646, Different character set in plot,...

 
 

bug #53646: Different character set in plot, in console and in the editor

Submitted by:  Charles Praplan <charprap>
Submitted on:  Sat 14 Apr 2018 07:17:08 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: ConfirmedAssigned to: None
Originator Name: Charles PraplanOpen/Closed: Open
Release: devOperating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 15 Apr 2018 10:51:21 AM UTC, comment #4:

While I can reproduce your observation with Octave 4.2, the console output no longer differs for the different graphics toolkits with the Octave 4.3.90 (release candidate for Octave 4.4).
In a way that is good. Previously, gnuplot changed the codepage of the command window from 65001 (utf-8) to 1252 (my system codepage "Latin-1"). That should not have happened.
Unfortunately, that still leaves the difference in handling the string encoding in different parts of the program (editor, console and plots).

Markus Mützel <mmuetzel>
Project Member
Sun 15 Apr 2018 09:56:15 AM UTC, comment #3:

Thank you all for answering.

I don't know why the console and the editor are related to graphics, BUT the way how the text is displayed, depends on the selected graphics_toolkit !!

There was a kind of table in my original subscription, showing the results for the different graphic toolkits.
Unfortunately it was not readable, therefore the result in another form:

qt graphics_toolkit:

output in editor : correct
output in console : NOT correct
output on plot : correct

gnuplot graphics_toolkit:

output in editor : correct
output in console : correct
output on plot : correct

fltk graphics_toolkit:

output in editor : correct
output in console : correct NOT correct
output on plot : correct

When changing the graphic toolkit, run the m-file twice, else the result is as for the "old" toolkit.

To illustrate what Markus said, I joint the file encoded as UTF-8. In this case, the situation is different, the text is displayed as desired in the console but not in the editor and in the plots.
In this case the graphic toolkit doesn't not play a role.

(file #43932)

Charles Praplan <charprap>
Sat 14 Apr 2018 01:18:31 PM UTC, comment #2:

That is a known problem on systems where the default editor/system encoding is not UTF-8 (can't find the most relevant bug report right now):
"Windows ANSI" encoding is basically the same as "ISO 8859-1" or "Latin-1". The Command Window always uses UTF-8 encoding to be able to display all Unicode characters.
The Command Window has its own problems in dealing with non-ASCII characters (bug #47571). But if you mark the whole file content and hit F9 the é is "correctly" encoded for the Command Window. But the strings in the plot will show odd.

What Octave probably should do, is use UTF-8 internally as its string encoding everywhere (and convert from whatever encoding is used in the editor/.m files).

While this bug mainly affects Windows (which unfortunately doesn't support UTF-8 as its system codepage), this problem arises on every system that has a system codepage different from UTF-8.

Still present in dev.

Markus Mützel <mmuetzel>
Project Member
Sat 14 Apr 2018 08:59:57 AM UTC, comment #1:

I don't understand what you find is wrong (and thus what you would expect). How are the console and the editor related to graphics toolkits? Why do you call your file "ANSI" (it makes me think of "ANSI C" encoding which doesn't support non ascii "é" character)?

Can you explain a bit more?

Pantxo Diribarne <pantxo>
Project Member
Sat 14 Apr 2018 07:17:08 AM UTC, original submission:

Octave for windows uses different character set in plot, in console and in the editor. Not tested for other OS.

This is graphics_toolkit dependent.

Summary for an ANSI m-file :

qt gnuplot fltk

output in editor correct correct correct
output in console NOT correct correct NOT correct
output on plot correct correct correct

See appended example: Octave_ANSI_files_test_case.m

Charles Praplan <charprap>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #43932:  Octave_UTF8_files_test_case.m added by charprap (140B - application/octet-stream)
file #43925:  Octave_ANSI_files_test_case.m added by charprap (136B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mmuetzel (Posted a comment)
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by charprap (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 15 Apr 2018 09:56:15 AM UTCcharprapAttached File-=>Added Octave_UTF8_files_test_case.m, #43932
    Sat 14 Apr 2018 01:18:31 PM UTCmmuetzelStatusNeed Info=>Confirmed
      Release4.2.2=>dev
    Sat 14 Apr 2018 08:59:57 AM UTCpantxoStatusNone=>Need Info
    Sat 14 Apr 2018 07:17:08 AM UTCcharprapAttached File-=>Added Octave_ANSI_files_test_case.m, #43925

    Back to the top


    Powered by Savane 3.1-cleanup1