convert '\r' to '\n' using three methods