This is the mail archive of the
mailing list for the Cygwin project.
RE: sed seems to force UC filename on Mixed 8.3 filenames on FAT32
- From: "Michel LaBarre" <michel dot labarre at rogers dot com>
- To: <cygwin at cygwin dot com>
- Date: Mon, 5 Mar 2018 12:05:31 -0500
- Subject: RE: sed seems to force UC filename on Mixed 8.3 filenames on FAT32
- Authentication-results: sourceware.org; auth=none
- References: <CAKqBF1jHvNbra2a=k12nAwDE2_0W14iG1v=KhuACzPmJmicfYA@mail.gmail.com> <firstname.lastname@example.org> <20180305164448.GC25306@calimero.vinschen.de>
> -----Original Message-----
> From: email@example.com [mailto:firstname.lastname@example.org] On
> Behalf Of Corinna Vinschen
> On Mar 5 11:42, Michel LaBarre wrote:
> > > Behalf Of Fergus Daly
> > > Starting to look exactly like that. On Windows 7 there is no problem.
> > > On earlier W10 machines in this office there is no problem. My machine
> > > underwent a massive (time-consuming) update on or around 13-FEB to
> > > Microsoft Windows Version 1709 Build 16299.248]
> > > from the previous
> > > Microsoft Windows Version 1703 Build 15063.936]
> > > and the troubles began then:
> > >
> > > ~> touch TryThis.TxT
> > > ~> ls T*
> > > TryThis.TxT
> > > ~> dos2unix TryThis.TxT
> > > dos2unix: converting file TryThis.TxT to Unix format...
> > > ~> ls T*
> > > TRYTHIS.TXT
> > >
> > > This on a FAT32 stick. (Can anybody confirm this behaviour?) So I'm
> > > guessing Windows has revised its default mount shortname syntax for
> > > VFAT. Is there a way I can climb in and alter / override that, does
> > > anybody know?
> > I have the same build 16299.248 and I get the same behaviour.
> > Perhaps consider: http://www.zoneutils.com/regtricks/filesystem.htm
> > for parameters to experiment with. You can use fsutil to control some of
> these to avoid direct registry modifications.
> > I expect it is more subtle otherwise the pervasive nature of the flags would
> mean that any file creation would result in UC names, not just dos2unix.
> > i.e. ls > Foo.txt should produce FOO.TXT
> Maybne something with overwriting existung files? What if you call
> `ls > Foo.txt' twice in a row?
Nope - that works ok. (BTW - you were fast on the reply!)
I did try:
E:\>dos2unix -n Zot.txt Foo.txt
dos2unix: converting file Zot.txt to file Foo.txt in Unix format...
I thought using -n might suffice as a quick workaround for Fergus so I tried:
E:\>dos2unix -n Zot.txt Zot.txt
dos2unix: converting file Zot.txt to file Zot.txt in Unix format...
Nuts! So the problem manifests if the input and output files are the same whether using -n or not. (Sorry Fergus - no workaround.)
As an aside, I experimented with "ed" to change a file and re-write it presuming it might behave as dos2nix - nope - it preserved mixed case ok.
> Corinna Vinschen Please, send mails regarding Cygwin to
> Cygwin Maintainer cygwin AT cygwin DOT com
> Red Hat
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple