Use IPPROTO_TCP instead of SOL_TCP for cross-platform compatibility.
minor fix for bug 9520:
- socket configuration attempts to determine if system supports ipv6
- checks app configuration, but configuration throws exception if called from embedded context
- solution is to put a try/catch guard and fall to an alternative test for ipv6
Refactorized convert(byte[], int, ...), now uses the pointer version.
Refactorized Convert(char[], int, ...) to use the pointer version.
Implemented method 'IsUnknownSurrogate()'.
removed index check because (1) it cannot be checked in this context and (2) it
only explains when a bad sequence started in the current or past buffer (in
this case it would take a negative value).
removed index check because (1) it cannot be checked in this context and (2) it
only explains when a bad sequence started in the current or past buffer (in
this case it would take a negative value).
Rewrite of core coder & decoder functions to fix several bugs and limitations, and improve error handling.
Merge remote-tracking branch 'upstream/master'
Disable BOM preamble in UTF8 by default (following best practices).
some minor code style changes
Merge branch 'master' of https://github.com/mono/mono
[xbuild] Actually delete common files (CopyLocal) during Clean.

The common files that should be deleted during Clean (see 4c37deb)
weren't actually written to the CleanFile, as they were stored in
FileWrites after it was already used to create CombinedFileWrites.
MS.NET implementation returns 1000 not 625.
bugfixed returned charsUsed counter
MS.NET implementation returns 1000 not 625.
Accept a null input/output buffer in InternalGetBytes()/InternalGetChars() if its length is zero.
Throw ArgumentException in GetBytes()/GetChars() if no enough output buffer space.
- improved flush handling in encoder/decoder for fixing regression bug #565129
- fixed some checks to satisfy test 'ConvertZeroCharacters'.
in test SufficientByteArray() when !NET_2_0 unexpected exceptions should be forwarded.
By default return an 'UTF8Unmarked' object.  Removed unused 'utf8EncodingWithMarkers' attribute.