It would be very recommended to rewrite doc. samples replacing \n with \r\n. It is a good practice, in addition to avoiding unexpected and bizarre errors like this one.
\n
\r\n