Using sed with strings of nonprintable characters

Hey, I'm having trouble figuring out the syntax for using sed with string of non-printable characters. What I have is the following format:

<field>@@;@@<field>@@;@@...@@;@@<field>@@^@@<field>@@;@@<field>@@;@@...@@;@@<field>@@^@@
...

With the @@;@@ being the delimeters between fields and the @@^@@ representing new lines. I need to replace the @@;@@ with commas, and the @@^@@ with actual new lines because there are none actually in the file. Can anyone help me out with the syntax to do this with sed or whatever would be the best option? Also, these delimeters could be changed to anything if you have any suggestions of better delimeters. Thanks.
-Richard

What I'm currently trying is the following:

nl="@@^@@"
del="@@;@@"

sed 's/\$nl/\012/' < temp2 > temp3
sed 's/\$del/\054/' < temp3 > temp4

but the first sed call empties the file for some reason and I can't figure out why. Any help would be much appreciated.
-Richard

awk '{gsub(/@@;@@/,",");gsub(/@@\^@@/,"\n");printf("%s\n",$0)}' <filename>

Yeah it dose empty the files
try like this

nl="@@^@@"
del="@@;@@"

sed 's/\$nl/\012/' temp2 > temp3
sed 's/\$del/\054/' temp3 > temp4

No ideas why exactly files are becoming zero bytes.....Any one any more thought??

Cheers,
Rex