On Wed, Jun 1, 2011 at 2:50 PM, Peter Schwalm <p...@peter-schwalm.de> wrote: > In the moment, I can only hope that no information is lost during the > implicit conversions of file i-o. That means I hope these conversion simply > add a 0-byte to every byte read in to make it unicode and only discards the > 0-byte when writing to a file.
I'm 99% sure that's how it works. One other option that I forgot about is the 2.7 io module: f = io.open('data.txt', 'rb') b = f.read() Passing the 'b' flag to open causes it to return bytes instead of strings, which should give you what you want. - Jeff _______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com