in reply to Avoiding printing ^M to STDOUT
What's the problem? If you want the character removed, then remove it.
Are those nested braces intentional in sub text {{ ... }}?