encode carriage return (\r)