Jump to content

Legal Folder Names - Many Misconceptions


cobaswosa

Recommended Posts

Hi all. I have a web server running on an ubuntu linux system. But as I thought today I just realized I know next to nothing about characters which are legal in naming directories. Searching didn't help in the sense that I don't even know if there is a difference between the restrictions of folder names on the web and folder names on a local machine.

 

Basically I am asking:

-What characters are allowed when naming a directory? Punctuation? Standards Symbols? Chinese? These "pictures":  ☺ (side question: what are these types of characters referred to as officially)? ™∞§¶¡•£ªº©´†œ¥? etc

-Even if they are allowed, should I not use them? And why?

-Can all of these legal characters be stored in a MySQL database?

-Are different browsers not able to access the folders with certain characters?

-What is the max folder name length?

-Do all of these questions vary for whatever OS you are hosting on?

 

The reason I ask such a question is that Id like users to be able to create folders on the site based on a string they type in, but I have no idea which characters to restrict.

 

Thanks! I know this is a lot, sorry.  :)

Link to comment
https://forums.phpfreaks.com/topic/174019-legal-folder-names-many-misconceptions/
Share on other sites

As far as I'm aware, Linux uses the same naming conventions for files and directories. You should generally just stick to the normal a-z 0-9 . _ - characters, to avoid any hassle. There are a select amount of special characters that can be used (I'm don't know what they are without digging them out), but to make life easier for yourself you should just stick those above.

 

Take a look at this for more info.. http://lowfatlinux.com/linux-filenames.html

 

Also with regard to MySQL support, that would depend up on the charset your database uses. If you're using UTF-8, you probably not going to run into problems.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.