Handling Non-Alpha-Numeric Characters

From SRB

Since SRB is middle-ware, it is often sandwiched between the client and data sitting on one or more resource servers. Many times, the client, the SRB, and a resource server may all be running on different machines, each a different operating system platform. As each platform has its own file-system naming conventions, this sometimes creates interesting scenarios involving files uploaded from a particular client, stored on a given resource, and subsequently downloaded with the same or another client.

In general, Windows is pretty straightforward in that you can’t use / \ : * ? “ < > or | in any file or path name; Many other non-alpha-numerics are allowed and commonly used by Windows users such as ‘ and &. Many of these characters often cause problems for those using Unix-based systems; this is because while the operating system only prohibits the use of / in a filename, many non-alpha-numerics hold special meaning to its many shells.

This means that in previous versions of SRB it was possible to upload files from a Unix client which would fail when an attempt was made to store it on or replicate it to a Windows-based resource server (the : character was a common example). Likewise, it was possible to download data generated by a Windows user onto a Unix system and have it be cumbersome to interact with (try editing a file with & in it =)). Making matters worse, users may or may not know (and shouldn’t have to) which platform a given resource was hosted on.

To add to this situation were several characters which were reserved by SRB for various reasons. Two characters frequently used by many clients which created problems when subsequently trying to interact with them were & and ‘.

SRB versions 3.4.0 and later all contain non-alpha-numeric character support for both the SRB MCAT and its resource servers, with the exception of the character sequence ‘’. This means that no file should fail to upload into SRB due to a naming convention issue with the SRB or a resource server’s underlying OS platform.

It is still possible however, to download a file from SRB to a local system and have the operation fail due to an illegal character in the SRB data’s name. We decided to leave naming convention translation to each user, based on individual needs, usage patterns, and preference. Thus, there is no system-wide automatic-name-translation at API level at this time; any translation or warnings are left to the individual client writer.

The following is a list of characters users of multiple platforms may care to avoid when naming their files:

Unix-based systems: \ : * ? “ < > | (These cause problems for Windows users)

Windows-based systems: % $ ‘ ~ | & ^ ! and in a number of cases . (These causes problems for Unix shells)

Other systems (Web, Macs, etc) : all of the above, plus / \ (These will cause problems for at least one platform)

Prior to SRB 3.4.0, the following characters would cause problems for SRB, and are not recommended even for those not using an affected platform as a resource: & % ‘ “