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:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
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.

 

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:
   
   
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 (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.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.5