Encode with universal newline