Message1974

Author abarua
Recipients
Date 2007-10-13.17:30:00
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.
History
Date User Action Args
2008-02-20 17:18:04adminlinkissue1812947 messages
2008-02-20 17:18:04admincreate