bugGNU Octave - Bugs: bug #52211, saveas does mess up UTF8 filenames


bug #52211: saveas does mess up UTF8 filenames

Submitted by:  Georg Wiora <gwiora>
Submitted on:  Thu 12 Oct 2017 09:08:48 AM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  gwiora Open/Closed:  Closed
Release:  dev 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 17 Oct 2017 06:52:02 AM UTC, comment #4: 

No, I won't post a new item. You have already done so: bug #50409 :-)

Georg Wiora <gwiora>
Tue 17 Oct 2017 06:46:46 AM UTC, comment #3: 

Thank you for the quick fix!

In Octave windows GUI the editor encoding is typically set to SYSTEM, what should be UTF8. Unfortunately the Command window encoding is not configurable, at least not from gui. I will post a separate item on that.

Georg Wiora <gwiora>
Mon 16 Oct 2017 06:38:06 PM UTC, comment #2: 

I updated the patch in bug #49118 to include a fix for the issue here.
However, you would also need to manually change the code page of the Editor to UTF-8 or manually convert the file name to UTF-8:

saveas (fh, native2unicode (uint8 ('Längs.pdf')))

Octave should probably best seamlessly convert strings from the code page used in the editor to its internal codepage (UTF-8).
I think there was a bug report about this somewhere. But I can't find it at the moment.

Closing as a duplicate of bug #49118 because the main issue is solved by the patch there.

Markus Mützel <mmuetzel>
Project Member
Sun 15 Oct 2017 07:36:41 PM UTC, comment #1: 

Thank you for reporting this issue.
The problem is that pipe doesn't support non-ASCII characters on Windows yet. There is bug #49118 that grew to cover most of those issues with non-ASCII characters on Windows. This particular issue is still present with the patch there.
Adding a dependency to that bug. Leaving this one open until there is a fix (probably in the other bug report).

Markus Mützel <mmuetzel>
Project Member
Thu 12 Oct 2017 09:08:48 AM UTC, original submission:  

When using saveas to save a figure object and the filename contains non 7-bit characters or utf-8 characters, the filename created on disc is corrupted. Example:


The saveas command produces the following filename on disk:


The hgsave creates the correct filename as specified.

Georg Wiora <gwiora>


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

Attach Files:

No files currently attached


   bug dependencies.

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 gwiora (Submitted the item)

    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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-10-16 mmuetzel StatusConfirmed => Duplicate
        Open/ClosedOpen => Closed
    2017-10-15 mmuetzel StatusNone => Confirmed
        Release4.2.1 => dev
        Dependencies- => Depends on bugs #49118

    Back to the top

    Powered by Savane 3.5