Issue1812947

classification
Title: File read converts \r to \n
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: abarua, pjenvey
Priority: normal Keywords:

Created on 2007-10-13.17:30:00 by abarua, last changed 2007-10-13.23:19:08 by pjenvey.

Messages
msg1974 (view) Author: Arunabh Barua (abarua) Date: 2007-10-13.17:30:00
When reading a file with for example: open('test.txt').read() - converts \r characters to \n. To reproduce the following code helps:

#Create a test file
test_string='\r'
f=open('test.txt','w')
f.write(test_string)
f.close()
#Read data contents
open('test.txt').read()

In CPython the last statement results in \r (correct) while in Jython it results in \n.
msg1975 (view) Author: Philip Jenvey (pjenvey) Date: 2007-10-13.23:19:08
duplicate of #1812913
History
Date User Action Args
2007-10-13 17:30:00abaruacreate