Names can be extraordinarily long or just a single char. Theres a lot of stories where serious issues are caused by software systems and their implementation of handling names.
To answer your question: I dont know if theres a good single spec to follow.