I needed to create a text clipping that contained the "@" character, but couldn't, because MacOS creates dragged text containing an "@" character as an email link. See for yourself: Select the following text -- xxxx+yyyy -- then drag it to your Desktop. This creates a text clipping file named xxxx+yyyy.textClipping. Now select the following text -- xxxx@yyyy -- and drag it to your Desktop, and notice that the file is named xxxx@yyyy.mailloc, and its icon says MAILTO. If you drag and drop this text into a program, it will get pasted as mailto:xxxx@yyyy.mailloc.
The solution requires editing the xxxx+yyyy.textClipping clipping file. This requires several steps:
Step One: Extract the resource fork. In Terminal, do this:
% cd Desktop
% cat xxxx+yyyy.textClipping/rsrc > tmp.txt
Step Two: Edit the temporary file. Now use your favorite editor (mine is Emacs.app) to carefully replace all instances of + with @ in tmp.txt. I chose the "+" character for my clipping file based on the observation that the clipping resource is unlikely to contain that character. Feel free to use a different character, but make sure it doesn't appear elsewhere in the clipping file.
% cat tmp.txt > xxxx+yyyy.textClipping/rsrc
Or, if you get an error saying xxxx+yyyy.textClipping/rsrc: File exists, try the following instead:
% cat tmp.txt >! xxxx+yyyy.textClipping/rsrc
Now you may delete the temporary file, and rename the text clipping if you wish. Dragging the clipping file into a text area will then paste the intended text.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20081128052657443