This hint started as a tip from avanham, who wrote:
I downloaded the Java SDK 1.3.1 API documentation from java.sun.com and had always thought that some of the pages were missing because some of the links did not work. Recently, I discovered that they were, in fact, in the archive but that their names had been chopped short. This only happened with the long names like:This problem intrigued me, as both OS X and HFS+ support 255 character filenames, so I wasn't sure why UFS might be required to successfully expand the archive. A bit of experimentation seems to have found the answer.
DefaultStyledDocument.AttributeUndoableEdit.html
which ended up being something like:
DefaultStyledDocument.AttributeUndoableEdit.ht
The solution to this was to unzip the file into a UFS (BSD) formatted partition. I am not sure what the maximum length of an HFS Extended partition is, but obviously it is not enough.
As a first step, I downloaded the same SDK documentation and tried to expand it using Stuffit Expander. This resulted in the exact problem described above - truncated filenames for files with long names.
On a hunch, I then opened the Terminal and typed unzip j2sdk-1_3_1-doc2.zip. This worked perfectly -- using the same destination HFS+ disk as the failed Stuffit Expander expansion. So it appears that Stuffit Expander does not support long filenames in archives; this may be common knowledge, but it was news to me (and hasn't been documented here before).
You can test this for yourself by creating a folder with a really long filename (something like "folder with a really really really long name for testing purposes only"), then zip it in the terminal (zip testfile.zip "folder with a really really really long name for testing purposes only").
After the zip archive is created, switch to the Finder and use Stuffit Expander to extract it. You'll find that only the first 31 characters of the folder name are preserved. Now delete this badly named folder, switch to the Terminal, and type unzip testfile.zip. Switch back to the Finder and you'll see your original folder with its full name intact. So if you're having trouble with filenames in an expanded archive, you might wish to try the command line.
Of course, if you don't want to use the Terminal, there's another option available -- download OpenUp for OS X. This Cocoa program expands archives with long filenames successfully from the Finder, and the Terminal is not required (expanded archives are placed in your ~/Library/OpenUp directory.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20020406144701213