Message89257
>>> f = open('foo', 'wt+', encoding='UTF-16')
>>> f.write('spam ham eggs')
13
>>> f.seek(0)
0
>>> f.read()
'spam ham eggs'
>>> f.seek(0)
0
>>> f.read()
'\ufeffspam ham eggs'
Although the BOM character is a ZERO WIDTH NO-BREAK SPACE, and should
therefore not impose many problems, the behavior is inconsistent and
unexpected.
codecs.open in 2.x suffers from this same behavior. |
|
Date |
User |
Action |
Args |
2009-06-11 18:26:43 | eggy | set | recipients:
+ eggy |
2009-06-11 18:26:43 | eggy | set | messageid: <1244744803.37.0.794266933913.issue6268@psf.upfronthosting.co.za> |
2009-06-11 18:26:41 | eggy | link | issue6268 messages |
2009-06-11 18:26:41 | eggy | create | |
|