bugGNU Octave - Bugs: bug #64820, [MXE Octave] copyfile doesn't work...

 
 

bug #64820: [MXE Octave] copyfile doesn't work with Umlauts in path on Windows

Submitter:  mspo
Submitted:  Thu 26 Oct 2023 03:37:07 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 8.3.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 16 Nov 2023 01:25:10 PM UTC, comment #14: 

I downloaded and installed `octave-2023-11-16-00-12-default-w64-installer.exe` from buildbot.octave.space.
With it, I can no longer reproduce the issue from comment #0.

Thank you again for the fix.

Closing report.

Markus Mützel <mmuetzel>
Group administrator
Wed 15 Nov 2023 04:03:21 PM UTC, comment #13: 

If no binaries are being generated for it anymore, I would imagine there are few or no people who are going to building mxe-octave to get a version for 32bit

John Donoghue <lostbard>
Group Member
Wed 15 Nov 2023 02:24:28 PM UTC, comment #12: 

Thank you for the quick fix. 👍

I'll try to test when a new build from buildbot.octave.space is ready.

Maybe, it's time to drop support for Windows 32-bit in MXE Octave entirely?

Markus Mützel <mmuetzel>
Group administrator
Wed 15 Nov 2023 02:02:26 PM UTC, comment #11: 
John Donoghue <lostbard>
Group Member
Wed 15 Nov 2023 12:28:51 PM UTC, comment #10: 

Ok - that makes sense - currently we are the highest version is in both the i686 and x86_64 repos

I could make it use a diff version for x86_64 vs i686

John Donoghue <lostbard>
Group Member
Tue 14 Nov 2023 11:21:54 PM UTC, comment #9: 

I should have written that I tested with Octave installed with `octave-2023-11-14-00-09-default-w64-installer.exe` which I downloaded from buildbot.octave.space.
That was built from the default branch of MXE Octave. Afaict, that currently has the msys2-runtime version 3.3.6-6.

I overwrote the file with an updated version from MSYS2. That currently is at 3.4.9-2:
https://packages.msys2.org/base/msys2-runtime

Markus Mützel <mmuetzel>
Group administrator
Tue 14 Nov 2023 09:35:14 PM UTC, comment #8: 

Also note that msys2 is updated in the dev branch of our mxe repo, but not in the release version

So that may already have been 'fixed'

John Donoghue <lostbard>
Group Member
Tue 14 Nov 2023 09:33:29 PM UTC, comment #7: 

There should already be a /usr/bin/msys-2.0.dll from the msys2 repos so the question is perhaps why did one work vs the other ?

Im guessing a different version of the dll ? Can you work out the version of the package it came from ?

John Donoghue <lostbard>
Group Member
Tue 14 Nov 2023 07:40:08 PM UTC, comment #6: 

It started working after I copied `msys-2.0.dll` from the /usr/bin folder of MSYS2 to the /usr/bin folder of Octave for Windows.

@lostbard: Is this something that we could update in MXE Octave?

Markus Mützel <mmuetzel>
Group administrator
Tue 14 Nov 2023 07:07:02 PM UTC, comment #5: 

I started Octave for Windows (version 8.4.0 as distributed by Octave). A copyfile command containing non-ASCII characters failed.

I then replaced the /usr/bin folder from Octave for Windows in the PATH variable with /usr/bin from MSYS2. Now, copyfile successfully copied files containing non-ASCII characters.

So, it's likely none of the "native Windows" parts that differ. But something of the "Cygwin" parts...

The shell is a different version:
With /usr/bin from MSYS2:

>> system('sh --version')
GNU bash, version 5.2.15(2)-release (x86_64-pc-msys)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
ans = 0


With /usr/bin from Octave for Windows 8.4.0:

>> system('sh --version')
GNU bash, version 5.2.9(1)-release (x86_64-pc-msys)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
ans = 0


`cp` itself is the same in both:

>> system('cp --version')
cp (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.
ans = 0


I don't know what actually matters for this though...

Markus Mützel <mmuetzel>
Group administrator
Tue 14 Nov 2023 06:39:52 PM UTC, comment #4: 

I checked with Octave as distributed by MSYS2 for their MINGW64 environment.
With that version, non-ASCII characters are working with copyfile.
So, it is likely not an issue with Octave itself (or bug #59572). But it is likely caused by some other package that is distributed as part of Octave for Windows.

Re-opening report.

Markus Mützel <mmuetzel>
Group administrator
Fri 10 Nov 2023 10:22:09 AM UTC, comment #3: 

I can confirm the error with a build from the default branch on Windows.

I thought I remembered that I had a look at the `system` function with non-ASCII characters in the past. And indeed, it looks like you came across the part of bug #59572 that is still missing.

Closing this report as a duplicate of the older one.

Markus Mützel <mmuetzel>
Group administrator
Wed 01 Nov 2023 09:49:58 AM UTC, comment #2: 

I downloaded https://www.octave.space/data/stable/677/octave-2023-11-01-00-12-default-w64-installer.exe and tried the same line. I get the same error.

mspo
Sat 28 Oct 2023 09:08:32 AM UTC, comment #1: 

The `cp.exe` binary that is distributed with Octave for Windows is adopted from the MSYS2 project.

Could you please check if this is still an issue with a build from the default branch of MXE Octave? You can download pre-built binaries from that branch from here:
https://buildbot.octave.space/#/download

Use one of the installers with `-default-` in their file name.

The default branch bundles a newer version of that binary from MSYS2.

Markus Mützel <mmuetzel>
Group administrator
Thu 26 Oct 2023 03:37:07 PM UTC, original submission:  

I have to work with a few directories containing umlauts [öäü]. When using copyfile to copy files from there to elsewhere it doesn't work:

[s, m] = copyfile('C:\Täst\Neues Textdokument.txt', 'C:\Neues Textdokument.txt')

This gives me

cp: cannot stat '"C:/T'$'\303\244''st/Neues Textdokument.txt"': No such file or directory
s = 0
m =

The Octave cp.exe seems to be the problem here. I'm using Windows 10 22H2 in German.

mspo

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by mmuetzel
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by mspo (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 group members can vote.

     

    Follow 14 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-11-16 mmuetzel StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2023-11-15 lostbard StatusConfirmed Ready For Test
    2023-11-14 mmuetzel Carbon-Copy- Added lostbard
    2023-11-14 mmuetzel Open/ClosedClosed Open
    2023-11-14 mmuetzel StatusDuplicate Confirmed
        Summarycopyfile doesn't work with Umlauts in path on Windows [MXE Octave] copyfile doesn't work with Umlauts in path on Windows
    2023-11-10 mmuetzel Item GroupNone Unexpected Error or Warning
        StatusNeed Info Duplicate
        Open/ClosedOpen Closed
        Summary[MXE Octave] copyfile doesn't work with Umlauts in path copyfile doesn't work with Umlauts in path on Windows
        Dependencies- Depends on bugs #59572
    2023-10-28 mmuetzel Summarycopyfile doesn't work with Umlauts in path [MXE Octave] copyfile doesn't work with Umlauts in path
    2023-10-28 mmuetzel StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-54b4.
    Corresponding source code