opening files whose names contain CRs?
While traversing one of Eudora's subdirectories, I encountered a file whose name appears to be Icon\r, as: % pwd /Applications/Eudora Pro X/Eudora Spelling Checker % ls Ic* Icon? % ls Ic* | od -cx 000I c o n \r \n 49636f6e0d0a 006 When I try to open this file open(TMP, $path) or die can't open '$path'; I get an error. Help? -r -- email: [EMAIL PROTECTED]; phone: +1 650-873-7841 http://www.cfcl.com- Canta Forda Computer Laboratory http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc. http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series
Re: opening files whose names contain CRs?
Icon\r files appear when, in earlier Mac OS's, a folder - directory in UNIX parlance - was to be displayed by Finder with a special icon. I'm pretty sure the files are resource-only with no data fork. You might try concatenating /..namedfork/rsrc to the path but if you do open it it will be difficult to interpret without the resources of something like ResEdit and I don't think that's an aqua APPL yet. . . . . I am surprised by the 0d0a pair that you see. That doesn't happen in the MPW world of classic OS. It's possible that the ls operation adds the 0a prior to the pipe. At 18:24 -0700 9/13/03, Rich Morin wrote: While traversing one of Eudora's subdirectories, I encountered a file whose name appears to be Icon\r, as: % pwd /Applications/Eudora Pro X/Eudora Spelling Checker % ls Ic* Icon? % ls Ic* | od -cx 000I c o n \r \n 49636f6e0d0a 006 When I try to open this file open(TMP, $path) or die can't open '$path'; I get an error. Help? -- -- On the eighth day, about 6 kiloyears ago, the Lord realized that free will would make man ask what existed before the Creation. So He installed a few gigayears of history complete with a big bang and a fossilized record of evolution. --
Re: opening files whose names contain CRs?
At 8:14 PM -0600 9/13/03, Doug McNutt wrote: Icon\r files appear when, in earlier Mac OS's, a folder ... This is interesting, but it doesn't answer the question of how one opens a file with this sort of name weirdness. Basically, I think I've found a bug. Prolly should check for it in Panther... I am surprised by the 0d0a pair that you see. That doesn't happen in the MPW world of classic OS. It's possible that the ls operation adds the 0a prior to the pipe. Well, ls is always going to end its lines with \r... -r -- email: [EMAIL PROTECTED]; phone: +1 650-873-7841 http://www.cfcl.com- Canta Forda Computer Laboratory http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc. http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series
Re: opening files whose names contain CRs?
Well, ls is always going to end its lines with \r... --- Well, ls is always going to end its lines with \n... Sigh. -r -- email: [EMAIL PROTECTED]; phone: +1 650-873-7841 http://www.cfcl.com- Canta Forda Computer Laboratory http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc. http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series