This problem exists even if we ignore unicode. What is the reverse of the following string?
foo\r\n\bar
I imagine the most useful answer if you are writing a notepad-level application would be: rab\r\n\oof