Convert between actual newlines and literal \n
Convert actual newlines to literal \n or vice versa, useful for code and log processing.