Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium Target-2.7.6

New issue 1280 by pekka.klarck: XML output file has wrong line endings (\r\r\n) on Windows
http://code.google.com/p/robotframework/issues/detail?id=1280

Line endings on Windows should be \r\n (i.e. CRLF) but output.xml nowadays has \r\r\n (CRCRLF).

This is due to us using \r\n as the line separator but opening output file in mode where Python translates \n to \r\n automatically. Thus \r\n we use turns into \r\r\n. Log and report are written so that files are opened in "binary mode" where \n is not modified.

This can be fixed pretty easily by opening output.xml in 'wb' mode instead of 'w'. The real fix is opening files consistently (issue 1167) but that is a bit bigger task. The former fix can be done in possible RF 2.7.x minor releases but the latter needs to wait until RF 2.8.

Reply via email to