Dec 04, '08 07:30:03AM • Contributed by: shapiro
The solution requires editing the xxxx+yyyy.textClipping clipping file. This requires several steps:
- Extract the contents of its resource fork into a temporary file (using a receipe from this hint)
- Edit the temporary file
- Write the temporary file back into the resource fork.
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.
Step Three: Write the file back into the resource fork. Again in Terminal, use this command:
% 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.
[robg adds: Because the resource fork is created when the clipping file is created, you can't just change the extension, type, and creator of the file. If anyone knows a simpler way to get an "@" character into a text clipping, please post in the comments.]
