* UTF8Encoding.cs: Small optimization, reuse the static
EncoderFallback and DecoderFallback instead of creating new ones.
svn path=/trunk/mcs/; revision=138787
2009-07-28 Miguel de Icaza <miguel@novell.com>
+ * UTF8Encoding.cs: Small optimization, reuse the static
+ EncoderFallback and DecoderFallback instead of creating new ones.
+
* UTF8Encoding.cs: Use Equals to compare the objects as the
fallback objects do not overload operator ==. The comparison
was previously failing.
emitIdentifier = encoderShouldEmitUTF8Identifier;
#if NET_2_0
if (throwOnInvalidBytes)
- SetFallbackInternal (null, new DecoderExceptionFallback ());
+ SetFallbackInternal (null, DecoderFallback.ExceptionFallback);
else
- SetFallbackInternal (null, new DecoderReplacementFallback ("\uFFFD"));
+ SetFallbackInternal (null, DecoderFallback.StandardSafeFallback);
#else
throwOnInvalid = throwOnInvalidBytes;
#endif