Walter Dörwald sagte: > Nicholas Bastin sagte: > > It should be feasible to implement your own codec for that > based on Lib/encodings/utf_16.py. Simply replace the line > in StreamReader.decode(): > raise UnicodeError,"UTF-16 stream does not start with BOM" > with: > self.decode = codecs.utf_16_be_decode > and you should be done. Oops, this only works if you have a big endian system. Otherwise you have to redecode the input with: codecs.utf_16_ex_decode(input, errors, 1, False) Bye, Walter Dörwald
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4