Proposal #3337: expose Unicode and newline translation from System.IO

Ross Paterson ross at soi.city.ac.uk
Tue Jun 30 09:10:17 EDT 2009


This patch increases the need to make binary Handles a different type.

When you set the TextEncoding of an output Handle to utf16 or utf32,
does that trigger output of a BOM?

When you set the TextEncoding of an input Handle to utf16 or utf32,
does it immediately read a character looking for a BOM?

Do you really need two Newline modes per Handle?  Most Handles are
unidirectional, and even a ReadWrite Handle is reading and writing
to the same file.  The main benefit seems to be that you can apply
universalNewlineMode to any Handle, but is that worth the complication?


More information about the Libraries mailing list