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

 
 

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

Submitter:  Markus Mützel <mmuetzel>
Submitted:  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
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

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:
https://hg.savannah.gnu.org/hgweb/octave/rev/1c212b36a35e

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:
   
   
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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    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.9