In Tcl you could try something like this …
regsub 15$ $currentMsg 12 newMsg
… where 15$ is (octal) carriage return at the end of a line and 12 is (octal) line feed.
Or, if you have perl installed, you could try this from within Tcl …
[catch {exec perl -e “$_ = “$currentMsg”; “s/ 15/ 12/”; print”} newMsg]
You will probably need to tweak this for your actual needs and your specific environment.