help with sed

I need a small script that does the following on the files. can somebody shed light on this script with sed commands

Mabye have a look into the command tr with the -s option. It also takes octal codes so you can easily exchange special characters etc.