shell expansion produces e.g. "ls: cannot access '*.pdf': No such file or directory" in Windows CMD shell, but works okay in bash
Mon Mar 23 18:34:04 GMT 2020
(I have no idea what you mean about "top posting".)
`locale` gives the same in CMD as in bash, on this machine as on another machine on my network where I also checked, which also exhibits the same globbing problem under Windows CMD:
Aha, wait! No, there is one difference: in Cygwin Terminal (which I've never run before today; I've always either just run commands in a CMD window, or run bash.exe first; I'd initially mistakenly assumed that Cygwin terminal was the same as bash-in-CMD, but clearly it's not):
If I set LANG=en_US.UTF-8 in a Windows CMD window, **then the globbing problem goes away**.
I'm not sure how that points towards a solution, but it certainly must be a clue.
From: Andrey Repin <firstname.lastname@example.org>
Sent: Monday 23 March 2020 18:44
To: Jay Libove <email@example.com>; firstname.lastname@example.org
Subject: Re: shell expansion produces e.g. "ls: cannot access '*.pdf': No such file or directory" in Windows CMD shell, but works okay in bash
Greetings, Jay Libove!
Please no top posting in this mailing list.
> Good suggestion, deleting files one by one. It's not just one file,
> but it does seem to have something to do with some file name patterns.
> I think I've got it. It's accented characters.
> I live in Spain. Spanish has accented characters such as "Asociación".
> When I remove all files containing any accented character in their name, the problem goes away.
> So the theory now is that the Cygwin argv-processing code has a problem with áccented charàcters ...
Compare the output of `locale` in Cygwin terminal and your regular console.
Most likely your files have names that do not map cleanly to your console codepage, or locale is not set in the native terminal.
With best regards,
Monday, March 23, 2020 20:40:57
Sorry for my terrible english...
More information about the Cygwin