Re: file name extensions & extended ascii
Re: file name extensions & extended ascii
- Subject: Re: file name extensions & extended ascii
- From: garbanzito <email@hidden>
- Date: Thu, 13 Dec 2001 18:12:08 -0700
at 2001 12 13, 16:24 -0500, they whom i call Michael Turner wrote:
(*
File Name Fixer
Michael, i respect what you're trying to do here. i'm not
going to express an opinion about filenames on X, but i just
want to respond to a couple of assertions because being
clear on these issues is important to using Mac OS X ...
Lecture:
Characters you should avoid when switching to X include ".", " " & "/"
all these characters are "legal" in filenames, they don't
cause problems except in a few exceptional cases.
"/" is not at all a problem in an HFS+ filename, but will be
automatically translated (and vice versa) to ":" when the
same file is handled by the BSD subsystem, including the
shell. this process is completely transparent except in the
case of a few tools which incorrectly use the BSD
assumptions outside the BSD layer.
spaces are perfectly legal in both Mac & Unix filenames.
they only cause problems for few idiotic shell scripts (like
the iTunes 2 installer) and for people typing filenames in
the shell. but all you have to do in the shell is add an
escape character ("\") before a space, or put quotes around
the whole filename/path.
"." is the only real problem character. it's valid anywhere
in a filename, but at the beginning of a name it makes a
file hidden, which is probably undesired when moving a file
from 9 to X. in the middle, it can confuse Finder about the
extension, which *might* be a problem. at the end, "." is no
problem -- the file has no extension, and Finder is not
confused (though it can be when you change the name manually
to end in ".").
since it's common for Mac OS 9 files to have valid
extensions such as ".html", changing "." everywhere, as your
script does, could cause the loss of extensions where you'd
want them, and where they do no harm. i think the most
useful behavior to script would be to substitute "-" for "."
only at the beginning of filenames, and leave other
characters alone. if you wanted to get fancy, you could
substitute "-" for "." in the middle of a name when you
believe it doesn't already denote an extension.
When moving to OS X, the Apple OS installer will automatically tranlate
all files to include the filename extension.
no it won't. many Mac OS X applications (like some 9.x apps)
will add extensions to new files, but your old files will
all have the same names.
--
steve harley email@hidden