On Tue, Feb 01, 2011 at 04:33:03PM -0800, Shawn Walker wrote: > On 02/ 1/11 04:31 PM, Shawn Walker wrote: > >On 02/ 1/11 04:23 PM, Danek Duvall wrote: > >>Shawn Walker wrote: > >>>lines 2913, 2935, 2947: s/file/open/; "preferred way to open a file" > >>>according to pydoc; also, should probably use "rb"? > > > >[...] > > Oh, and before I forget, since the actions could contain binary data > (unicode), that's probably another good reason.
But UTF-8 and UTF-16 are not binary. They're just not ASCII. If you use the right type is should just work, and the 'b' really, at most, should be about EOL conversions (and no Unicode codepoint's encoding in UTF-8 is confusable with '\n' nor '\r'). But I agree that the 'b' is probably desirable here, particularly if there's no chance that anyone will need to read UTF-8 from these files on Windows or any other OS that likes anything other than '\n' for EOL. Nico -- _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
