For all Mac OS versions up to and including Mac OS 9.x:
File and Folder names are limited to 31 characters.
Volume names are limited to 27 characters.
Names cannot include the colon (:) character. This character is reserved by Mac OS to denote catalog hierarchy. A colon typed in a character name will be replaced by a dash (-) automatically by Mac OS.
Note: There are a few known instances where a volume name can be over 27 characters, but in order for the volume name to work correctly with file sharing and all Mac OS versions, file names should not exceed 27 characters.