Mac OS9 users created filenames with spaces at the front. They did this for years. Their goal was file sorting. When they wanted a file to sort higher, I believe they simply added more spaces. I've never seen any other computer users do that.
And also, I did not realize that you could create filenames that contained spaces at the front (or back) on Windows systems. In fact, I'm not sure that's ever been allowed on Windows... has it?
About 15 years ago, I had to migrate an entire Mac OS9 office group (200 systems) to Windows PC. I wrote a Python script to validate filenames and fix them in cases where they contained illegal Windows characters. We would ftp the files up to a Unix system, run the Python filename cleaning script then ftp down to the Windows PCs. It worked rather well, except for cases where the accountants named files something like this, "Summer-Report-07/15/1997.csv"
Mac OS9 file names allowed many characters that Windows did not and OSX may have inherited some or all of these things.
Unix tends to be ridiculously permissive with allowed characters in file names. On Linux, the only disallowed characters are NUL and the slash, and they are only disallowed because they have a special meaning (string terminator and path separator).
AFAIK, MacOS X also disallows NUL and slash, but IIRC its GUI silently switches slash (Unix path separator) with colon (which IIRC was the MacOS 9 path separator). So, if you were to migrate to OS X instead of to Windows (and if my knowledge is correct) you'd just have to replace the / with a : and the users wouldn't even notice.
Yes. That was for compatibility with os 9—when you copied files over they wanted the names to stay the same so they just switched the / to a : and back again.
> And also, I did not realize that you could create filenames that contained spaces at the front (or back) on Windows systems. In fact, I'm not sure that's ever been allowed on Windows... has it?
Just tried it from the command line and, yes, its quite possible on Windows 8.1.
Windows Explorer (the one in Win8.1, at least) won't allow creation of files with a space at the beginning or end of a name, but it's definitely allowed in the filesystem. For example, from a command prompt, this works:
echo hi > " hello.txt"
Explorer can see this file and perform operations on it, but if you try to rename it to a name with leading or trailing spaces, they get trimmed.
I have used '~' to cause files to sort at the top - this seems to be some oddity of the sorting order that Explorer uses, since ~ would sort at the end in ASCIIbetical order - but at least it's an allowed character at the beginning of a name in Explorer, unlike space.
People might do that, or not... but the fact that someone had to impose these restrictions in the first place, to me, is a warning sign that many places inside the respective software will have parsing issues/issues with handling of "weird" filenames.
In many cases, the restrictions come down to the underlying file-system and how it works. Not saying it is right or wrong, only that the reasons can be very fundamental.
Yes, OS X's Finder still doesn't have a way to sort directories before files. Having the space as first character is just a way to put them to the top.
We have to do that in our database for numbers since zeros get truncated off the left side if it is detected as a number--and the number of zeros is important.
I don't know about people doing stuff in file systems these days like that, but it is a simple hack.
The ways of Microsoft controls can be interesting indeed. At one point, we had to reverse-sort phone numbers to be loaded into a VARCHAR column in SQL Server. The vendor used a Microsoft control, which would look at a couple of phone numbers, say 2025551212, conclude that they were suitable for 32-bit integers, and choke somewhere around the 404 area code.
Then there was the time another package tried to write out street addresses that were something like 3E123 or maybe it was E456. Apparently the control read them as numbers in scientific format that were just way too big.
Since traversing forward is always cheaper than backwards, we subtract our reverse numbers by a magic number for things we want to access in reverse order. Or in this case, dates where the most recent is first.
Yes. Lots of Mac users do it. Goes back to the old 68000 Macs, still works on OS X. True, it's not a great idea if you use the CLI to interact with your computer, but old Macs never had a CLI, and lots of OS X users never open Terminal.
For example, you can’t start files with a space, something a lot of people do to move files to the top of alphabetical lists.
Do people really do that? That would drive me bonkers. Granted, I mainly work from a CLI so I guess it may not be as annoying if you mainly use a GUI.