As farWhile there are a number of file systems such as I am aware you cannot haveMacOS's HFS that accept a slash within a filename (/
or \
) within a filename as they, these are reserved characters within operatinggenerally considered to be reserved characters on many popular file systems, and importantly on the file systems typically used commercially as web servers (Windows/Linux). Therefore while you will need to observe the file system limitations of your intended deployment server, for best practice and in the interests of compatibility, you should also observe the file system limitations which are common or typical in order to ensure smooth transition should your hosting requirements and environment change in future.
The principle of URL-encoding (what you referred to as percent-encoding) is the method of using the correct syntax in the URL so that special characters can be sent in the URL without breaking the validity. A better example would have been for filenames that have a space character within them, for example my file.html
would become my+file.html
since a valid URL cannot have a space character.
There are not multiple ways URL-encode or decode reserved characters. %2F
and %2f
are the same thing, case insensitive, because the 2F represents a hexadecimal value, the decimal equivalent of which would be 47, and if you look at the ASCII table you'll see that character 47 is the forward slash (/
).
%c0%af
would be in decimal character 192 followed by character 175, both of which are extended ASCII characters and could vary in appearance depending on the font chosen. The HTML equivalent would be À¯
and might be displayed as À¯, definately not the same as a forward slash as you had thought.