One thing that I find catches users all the time is the difference in allowable characters permitted in a URL vs that in a Filespec (Directory and Filename string).
Amongst other issues, this means that when you use a browser to access files on a web server, spaces in the URL are illegal and must be encoded as "%20". On the other hand if you then use the same string with Windows Explorer, it will look for a Filespec containing a literal "%20".
While placing files on a web server using Windows Explorer and reading / fetching them with a browser are not an issue, as each will treat the filespec / URL according to its native rules, the problem arrises when providing a URL for a file on an SMB file share:-
- (file://server/share/file name) Sometimes the forward slash has to be escaped, so you end up with file:////server//share//file name). These will mostly work with a fat client mail program, because it accesses the file using Windows SMB rules, but when the recipient uses WebMail, the browser has an illegal URL and the link does not work.
Windows Filespecs use a backslash to separate diectory names and filenames, while on Nixes and in URLs, the forward slash is used.
- (file://server/share/file%20name) looks like it may fix the Browser issue, but now the fat client mail program looks for a file with the literal "file%20name" and the link does not work.
I publish the following simple guidelines for our users (in a FAQ along with an explanation) to help them avoid these issues..
...In order to avoid the problems that may occurr under different circumstances, you should adhere to these simple file and directory naming rules:-
1. Use only Arabic numbers ("0" through "9") and alphabetic characters ("a" through "z") and ("A" through "Z") along with the special characters "-", "_" and ".".
2. Do not use brackets or other special characters other than "-", "_" and ".".
3. Do not include spaces in in Directory names or Filenames. A the technique to make words obvious when run together is to capitalise the first letter of each word thus: "UseCapitalisedCharacters" (sometimes referred to as Camel Case).
4. Use the forward slash "/" instead of the back slash "\" to separate directories and filenames
Discussion on:
Message 37 of 37

































