Jump to content

Legal Folder Names - Many Misconceptions


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.