Message79330
| Author |
pitrou |
| Recipients |
amaury.forgeotdarc, pitrou, vstinner |
| Date |
2009年01月07日.12:59:00 |
| SpamBayes Score |
0.09866016 |
| Marked as misclassified |
No |
| Message-id |
<1231333141.17.0.860846830035.issue4862@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Well, there are other problems with utf-16, e.g. when opening an
existing file for appending, the BOM is written again:
>>> f = open('utf16.txt', 'w', encoding='utf-16')
>>> f.write('abc')
3
>>> f.close()
>>> f = open('utf16.txt', 'a', encoding='utf-16')
>>> f.write('def')
3
>>> f.close()
>>> open('utf16.txt', 'r', encoding='utf-16').read()
'abc\ufeffdef'
Who said TextIOWrapper was sane? :-o |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2009年01月07日 12:59:01 | pitrou | set | recipients:
+ pitrou, amaury.forgeotdarc, vstinner |
| 2009年01月07日 12:59:01 | pitrou | set | messageid: <1231333141.17.0.860846830035.issue4862@psf.upfronthosting.co.za> |
| 2009年01月07日 12:59:00 | pitrou | link | issue4862 messages |
| 2009年01月07日 12:59:00 | pitrou | create |
|