bugGNU Octave - Bugs: bug #59287, Functions shouldn't use `glob` on...


bug #59287: Functions shouldn't use `glob` on Windows

Submitted by:  Markus Mützel <mmuetzel>
Submitted on:  Sat 17 Oct 2020 02:27:06 PM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  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.


Sun 29 Nov 2020 03:08:07 PM UTC, comment #2: 

˙copyfile`, `movefile`, and `fileattrib` still aren't working for files containing non-ASCII characters on Windows. But at least, this is no longer due to `glob`...

Closing as fixed.

Markus Mützel <mmuetzel>
Project Member
Mon 23 Nov 2020 04:36:49 PM UTC, comment #1: 

I pushed a change on default here:

Marking as ready for test.

Markus Mützel <mmuetzel>
Project Member
Sat 17 Oct 2020 02:27:06 PM UTC, original submission:  

In bug #59231, it turned out that `glob` doesn't work with non-ASCII characters in directory or file names on Windows.
There was also a report on the discourse forum which might have been caused by this issue. [1]
Since we are using functions provided by gnulib to get `glob` on Windows and gnulib uses the ANSI API on that platform, the only way to fix that would be to re-implement `glob` on Windows using its Unicode API. Imho, this is out of scope of a project like Octave.

On the other hand, `__wglob__` will be working with non-ASCII characters in Octave 7.
So until `glob` is fixed upstream (which I doubt will happen in the foreseeable future), the next best solution would imho be to use `__wglob__` on Windows.

For completeness: The difference between `glob` and `__wglob__` is that `__wglob__` only supports the wildcards "*" and "?" (not patterns like "[abc]").

.m file functions that are currently using "glob" are:

  • copyfile.m
  • fileattrib.m
  • movefile.m
  • unpack.m
  • pkg/private/rebuild.m

[1]: https://octave.discourse.group/t/pkg-installation/316

Markus Mützel <mmuetzel>
Project Member


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

Attach Files:

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 (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-29 mmuetzel StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2020-11-23 mmuetzel StatusNone => Ready For Test

    Back to the top

    Powered by Savane 3.6