* UTF8Encoding.cs: Small optimization, reuse the static
EncoderFallback and DecoderFallback instead of creating new ones.
svn path=/trunk/mcs/; revision=138787
* UTF8Encoding.cs: Use Equals to compare the objects as the
fallback objects do not overload operator ==. The comparison
was previously failing.
svn path=/trunk/mcs/; revision=138786
* StringBuilder.cs: don't throw on null values in ctor(string, int).
Unify another ctor into the main one to account for MaxCapacity.
svn path=/trunk/mcs/; revision=138692
* UTF8Encoding.cs : surrogate characters are handled in
InternalGetChars() but not in InternalGetCharCount().
Fixed bug #415628.
* UTF8EncodingTest.cs : added test for bug #415628.
* 415628.bin : new test resource.
* Makefile: new resource, new EXTRA_DIST mess.
svn path=/trunk/mcs/; revision=125075
2009-01-13 Jb Evain <[email protected]>
* Encoding.cs: when creating a ForwardingEncoder or a
ForwardingDecoder, don't crash if the Encoding doesn't
provide an EncoderFallback or a DecoderFallback.
in Test/System.Text:
2009-01-13 Jb Evain <[email protected]>
* EncoderTest.cs: Make sure we can get an encoder for a custom
encoding.
* DecoderTest.cs: ditto.
svn path=/trunk/mcs/; revision=123196
* UTF8Encoding.cs: rewritten InternalGetByteCount () and
InternalGetBytes (): among other things this versions are
10% to 60% faster, depending on input type and size.
svn path=/trunk/mcs/; revision=114925
* String.cs (ReplaceUnchecked): Avoid any unnecessary work and
string allocations by returning early when no oldValue was found.
2008-09-08 Juraj Skripsky <[email protected]>
* StringBuilder.cs (Replace): Return early when no oldValue was
found. Avoid extra string allocations.
svn path=/trunk/mcs/; revision=114321
* StringBuilder.cs (ToString): Use String.SubstringUnchecked instead
of String.Substring, as the former is guaranteed to create a new
string object. Fixes bug #395904.
* String.cs (Substring): Blocking bug #395904 has been fixed,
re-enable optimization.
* StringTest.cs (Substring2): Blocking bug #395904 has been fixed,
re-enable test.
svn path=/trunk/mcs/; revision=104629
* UTF7Encoding.cs :
Fixed misplaced leftOverSize reset in InternalGetCharCount().
Fixed base64 value for '+' (the value is actually unused though).
* UTF7EncodingTest.cs : added test for broken GetCharCount() case.
svn path=/trunk/mcs/; revision=100197
* String.cs: Update of String that moves all remaining non-culture-sensitive
code to managed C# code. Improves performance for most cases and most methods
allows code-optimizations tools to perform better optimizations by removing the
internalcalls. Reduces the total number of lines of code used for String.
Allows code duplication reduction in several other classes and the runtime.
* StringComparer.cs: Remove duplicate code and call relevant String methods.
* StringBuilder.cs: Use the new managed String functions.
svn path=/trunk/mcs/; revision=99569
* DecoderExceptionFallback.cs: Use 'is' instead of 'as' and a null
check. Found using Gendarme new UseIsOperator rule.
* EncoderExceptionFallback.cs: Use 'is' instead of 'as' and a null
check. Found using Gendarme new UseIsOperator rule.
svn path=/trunk/mcs/; revision=95400
* DecoderFallback.cs, EncoderFallback.cs, Encoding.cs :
the same "\uFFFD" fix for encoder fallback.
Reduced extra instantiation of those fallbacks.
* EncoderReplacementFallbackTest.cs,
EncoderReplacementFallbackBufferTest.cs : encoder test for
"\uFFFD" replacement.
svn path=/trunk/mcs/; revision=91947
* Encoding.cs : added UTF8UnmarkedUnsafe, for old empty replacement
UTF8.
* BinaryReader.cs, BinaryWriter.cs : use unsafe encoding that has ""
for replacement fallback. Binary serialization regression is fixed.
svn path=/trunk/mcs/; revision=88276
* DecoderReplacementFallbackBuffer.cs : Reset() should also reset the
input buffer. When fallback is not assigned, just return '\0'.
* UnicodeEncoding.cs : handle throwOnInvalid .ctor argument.
Default replacement fallback buffer is now "\uFFFD".
* UTF8Encoding.cs : couple of replacement buffer size fixes.
Default replacement fallback buffer is now "\uFFFD".
* UTF32Encoding.cs : Default replacement is "\uFFFD" too here.
See http://support.microsoft.com/kb/940521/ for this change.
* UnicodeEncodingTest.cs,
UTF8EncodingTest.cs,
DecoderReplacementFallbackBufferTest.cs,
DecoderReplacementFallbackTest.cs : default replacement buffer fix.
Added test for Reset() for replacement buffer.
svn path=/trunk/mcs/; revision=88150
* StringBuilder: hide non 2.1 AppendFormat on 2.1 so that
the compile picks up the adequate method when AppendFormat
is used in 2.1 platform code.
svn path=/trunk/mcs/; revision=84160
* Encoding.cs : the change broke the build, so reverted part of it.
* EncodingTest.cs :
reverted part of the related patch, thus added NotWorking.
svn path=/trunk/mcs/; revision=72087
* Encoding.cs: In GetEncoding (int) do not allow codepage value below zero
and above 0xffff. Modified NotSupportedException to ArgumentException in
GetEncoding (string).
* corlib_test.dll.sources: Added EncodingTest.cs.
svn path=/trunk/mcs/; revision=72052
* Encoding.cs :
Consider DecoderFallback and EncoderFallback in 2.0 Equals()
and GetHashCode().
* UTF32Encoding.cs, UTF7Encoding.cs :
Fixed GetHashCode() and Equals() as well.
Added several missing overrides in 2.0.
svn path=/trunk/mcs/; revision=64299