[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: non-unix help needed: valid filename characters?



Hallvard B Furuseth wrote:
Heh. Thanks for the info. Have you built OpenLDAP on everything?

That's what we (Symas) do. ;) You forget that outside of OpenLDAP I have code running on 98% of the computers in the world. (And a few off the world too...)


I expected I'd need advice from half a dozen different people:-)

Howard Chu writes:
MacOSX supports both BSD UFS and Mac HFS(+). In UFS a forward slash is
reserved as a path separator, while in HFS the colon serves that purpose.
MacOSX swaps the two whenever they appear in the wrong filesystem.

(...) Currently the MacOSX FileManager will always display paths with
"/" as the separator, so it's simplest to treat MacOSX the same as
Unix/POSIX.

Might as well hex-escape ':' on all systems, since it's troublesome at least for the users on both MacOSX and Windows.

Fair enough.

(And '/', 8-bit and control chars, and a special hack for windows according to your latest message on the ITS.)

Honestly, I wouldn't make any special effort for control characters. All the filesystems we touch accept them. (Makes life interesting when you're trying to enter a filename at the command line, but what the heck, you can always glob it.) 8-bit I'm not so sure about, some filesystems expect UTF-8, while others are 8-bit clean to begin with. If we can expect that no one is going to use an octetString as a naming attribute, I think we'll be fine since everything else will be in UTF-8 anyway.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/