Commit Graph
202 Commits
Author SHA1 Message Date
Rolf Bjarne Kvinge ab0f056e62 2010-06-18 Rolf Bjarne Kvinge <[email protected]>
* StringBuilder.cs: Moonlight needs Clear too.

svn path=/trunk/mcs/; revision=159110
2010-06-17 23:46:43 +00:00
Jb Evain e73cf2586e use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153659
2010-03-16 12:13:57 +00:00
Jb Evain 8ad6f160cc 2010-02-02 Jb Evain <[email protected]>
* ASCIIEncoding.cs, Latin1Encoding.cs: remove duplicated code.

svn path=/trunk/mcs/; revision=150721
2010-02-02 18:22:05 +00:00
Chris Toshok 098cdab4f3 2009-12-09 Chris Toshok <[email protected]>
* Encoding.cs (get_Default): moonlight defaults to UTF8, not
	UTF8Unmarked.


svn path=/trunk/mcs/; revision=148148
2009-12-11 20:38:39 +00:00
Marek Safar 5d6e605db6 2009-11-24 Marek Safar <[email protected]>
* UTF8Encoding.cs (GetPreamble): Let compiler optimize it.


svn path=/trunk/mcs/; revision=146838
2009-11-24 16:08:59 +00:00
Miguel de Icaza 53d746c7a1 2009-11-02 Miguel de Icaza <[email protected]>
* Jumbo patch to drop support for pre-NET_2_0 code:

        Remove NET_2_0 defines assuming the value is true.


svn path=/trunk/mcs/; revision=145232
2009-11-03 00:27:28 +00:00
Miguel de Icaza 0f4742e754 2009-10-22 Miguel de Icaza <[email protected]>
* StringBuilder.cs (Text): Add new 4.0 method.

svn path=/trunk/mcs/; revision=144601
2009-10-22 06:14:26 +00:00
Sebastien Pouliot 74870bf3c6 2009-10-06 Sebastien Pouliot <[email protected]>
* Encoding.cs: Remove normalization methods for Moonlight


svn path=/trunk/mcs/; revision=143536
2009-10-06 17:15:32 +00:00
Sebastien Pouliot 4cfb97dff5 fix smcs with utf32 encoded files
svn path=/trunk/mcs/; revision=142544
2009-09-24 01:19:05 +00:00
Sebastien Pouliot ba83238a54 2009-09-22 Sebastien Pouliot <[email protected]>
* Encoding.cs: Remove UTF32, Latin1 and custom (loaded code)
	encodings for NET_2_1


svn path=/trunk/mcs/; revision=142397
2009-09-22 13:34:24 +00:00
Miguel de Icaza e13c611802 2009-07-28 Miguel de Icaza <[email protected]>
* UTF8Encoding.cs: Small optimization, reuse the static
	EncoderFallback and DecoderFallback instead of creating new ones. 

svn path=/trunk/mcs/; revision=138787
2009-07-28 05:06:31 +00:00
Miguel de Icaza 9afbbceb72 2009-07-28 Miguel de Icaza <[email protected]>
* 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
2009-07-28 05:04:08 +00:00
Gonzalo Paniagua Javier 58ee030265 2009-07-26 Gonzalo Paniagua Javier <[email protected]>
* 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
2009-07-26 17:08:10 +00:00
Gonzalo Paniagua Javier 02d4790b5d 2009-07-26 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: small fixes dealing with _maxCapacity.


svn path=/trunk/mcs/; revision=138686
2009-07-26 16:26:55 +00:00
Gert Driesen a06084d909 * UTF32Encoding.cs: Added missing argument check in GetByteCount
(char*, int) overload.

svn path=/trunk/mcs/; revision=125863
2009-02-05 14:55:41 +00:00
Atsushi Eno 16ac3b3241 2009-02-04 Atsushi Enomoto <[email protected]>
* UTF32Encoding.cs : fixed wrong range in GetByteCount(). Patch by
	  David Michell.


svn path=/trunk/mcs/; revision=125648
2009-02-04 04:23:38 +00:00
Atsushi Eno 3ef06e62ed 2009-01-30 Atsushi Enomoto <[email protected]>
* 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-30 12:13:56 +00:00
Jb Evain 37111e4f26 in System.Text:
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
2009-01-13 15:25:45 +00:00
Paolo Molaro 3555435166 Mon Oct 6 09:46:09 CEST 2008 Paolo Molaro <[email protected]>
* 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
2008-10-06 07:50:20 +00:00
Juraj Skripsky 744c5ae2dc Correct the date.
svn path=/trunk/mcs/; revision=114322
2008-09-28 08:23:47 +00:00
Juraj Skripsky bc9fd8e27d 2008-09-28 Juraj Skripsky <[email protected]>
* 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
2008-09-28 08:22:28 +00:00
Andreas N da7510bf08 2008-07-03 Andreas Nahr <[email protected]>
* UTF8Encoding.cs: Fix parameter names, Remove unfounded TODO

svn path=/trunk/mcs/; revision=107134
2008-07-03 08:16:05 +00:00
Andreas N 5122e976a5 2008-07-03 Andreas Nahr <[email protected]>
* UTF8Encoding.cs:
	* UTF7Encoding.cs:
	* UTF32Encoding.cs:
	* EncodingInfo.cs:
	* Encoding.cs:
	* Encoder.cs:
	* ASCIIEncoding.cs: Fix parameter names

svn path=/trunk/mcs/; revision=107125
2008-07-02 23:55:44 +00:00
Juraj Skripsky 169c1ff0f6 2008-06-01 Juraj Skripsky <[email protected]>
* 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
2008-06-01 17:57:48 +00:00
Andreas N 7b48206118 2008-05-15 Andreas Nahr <[email protected]>
* StringBuilder.cs: Resubmit uncritical parts of String cleanup patch

svn path=/trunk/mcs/; revision=103327
2008-05-15 22:16:16 +00:00
Atsushi Eno c12917a979 2008-04-09 Atsushi Enomoto <[email protected]>
* 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
2008-04-09 07:11:59 +00:00
Miguel de Icaza de8d832cb1 Revert this patch, it regressed the compiler and System.Web
svn path=/trunk/mcs/; revision=99708
2008-04-02 23:21:34 +00:00
Andreas N d4040600dc 2008-04-01 Andreas Nahr <[email protected]>
* 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
2008-04-01 19:42:34 +00:00
Kornél Pál 895c02b7dd Encoding.cs: Fix possible integer overflow in argument validation.
svn path=/trunk/mcs/; revision=99097
2008-03-27 08:44:58 +00:00
Sebastien Pouliot 5c5910aa1f 2008-02-10 Sebastien Pouliot <[email protected]>
* 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
2008-02-10 19:46:47 +00:00
Atsushi Eno 646393c59c 2007-12-27 Atsushi Enomoto <[email protected]>
* 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
2007-12-27 16:04:57 +00:00
Atsushi Eno 383cb727e2 2007-10-27 Atsushi Enomoto <[email protected]>
* Encoding.cs : fixed UTF8UnmarkedUnsafe for 1.1; should not be null.


svn path=/trunk/mcs/; revision=88297
2007-10-27 03:07:15 +00:00
Atsushi Eno 4089f586b1 2007-10-26 Atsushi Enomoto <[email protected]>
* 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
2007-10-26 17:27:23 +00:00
Atsushi Eno fcf08f9da0 2007-10-25 Atsushi Enomoto <[email protected]>
* UnicodeEncoding.cs : fix build.


svn path=/trunk/mcs/; revision=88155
2007-10-25 12:32:08 +00:00
Atsushi Eno f4071fef2b 2007-10-25 Atsushi Enomoto <[email protected]>
* 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
2007-10-25 09:42:03 +00:00
Jb Evain fe8d5cb86b 2007-08-15 Jb Evain <[email protected]>
* 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
2007-08-15 19:25:27 +00:00
Miguel de Icaza 9518892a7a 2007-07-28 Miguel de Icaza <[email protected]>
* StringBuilder.cs (Text): Check for null, from Jesse Jones.

svn path=/trunk/mcs/; revision=82913
2007-07-28 15:45:54 +00:00
Dick Porter ed0e0a5242 2007-05-03 Dick Porter <[email protected]>
* ProxyAttribute.cs: 
	* RealProxy.cs: Update to 2.0 profile

2007-05-03  Dick Porter  <[email protected]>

	* ITrackingHandler.cs: 
	* EnterpriseServicesHelper.cs: 
	* TrackingServices.cs: Update to 2.0 profile

2007-05-03  Dick Porter  <[email protected]>

	* IFieldInfo.cs: 
	* ISoapMessage.cs: 
	* InternalRM.cs: 
	* InternalST.cs: 
	* ServerFault.cs: 
	* SoapFault.cs: 
	* SoapMessage.cs: 
	* FormatterAssemblyStyle.cs: 
	* FormatterTypeStyle.cs: 
	* TypeFilterLevel.cs: Update to 2.0 profile

2007-05-03  Dick Porter  <[email protected]>

	* BinaryFormatter.cs: Update to 2.0 profile

2007-05-03  Dick Porter  <[email protected]>

	* Encoding.cs: 
	* UnicodeEncoding.cs: 
	* UTF7Encoding.cs: Update to 2.0 profile



svn path=/trunk/mcs/; revision=76625
2007-05-03 16:21:18 +00:00
Gert Driesen 5aa45b37f3 * Encoding.cs: Enabled ArgumentException in GetEncoding (string) again.
In Encoding.Default, catch both ArgumentException and NotSupportException.
* EncodingTest.cs: Enabled test again.

svn path=/trunk/mcs/; revision=72130
2007-02-01 20:06:07 +00:00
Atsushi Eno bb68bac1cb 2007-02-01 Atsushi Enomoto <[email protected]>
* 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
2007-02-01 12:43:52 +00:00
Gert Driesen 4f954982a9 * Encoding.cs: Also set ParamName of the ArgumentException.
* EncodingTest.cs: Improved test for not-supported encoding.

svn path=/trunk/mcs/; revision=72057
2007-01-31 22:22:48 +00:00
Gert Driesen dc13e6c1f5 * EncodingTest.cs: Added tests for GetEncoding.
* 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
2007-01-31 20:58:30 +00:00
Atsushi Eno c47e25f521 2006-12-18 Atsushi Enomoto <[email protected]>
* EncoderFallbackBuffer.cs : implement Reset().


svn path=/trunk/mcs/; revision=69640
2006-12-18 03:43:44 +00:00
Ben Maurer 6ed0bbc5c9 2006-10-25 Ben Maurer <[email protected]>
* Encoding.cs: Make the GetByteCcount method used fixed pointers
	removes quite a few allocations from Banshee.

svn path=/trunk/mcs/; revision=66970
2006-10-25 21:21:13 +00:00
Zoltan Varga f0036b2e1c 2006-09-03 Zoltan Varga <[email protected]>
* StringBuilder.cs (.ctor): Add a comment.

svn path=/trunk/mcs/; revision=64800
2006-09-03 12:48:54 +00:00
Atsushi Eno dd908d994b 2006-08-24 Atsushi Enomoto <[email protected]>
* 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
2006-08-24 11:32:00 +00:00
Atsushi Eno 3d38b05790 eek, eek.
svn path=/trunk/mcs/; revision=64293
2006-08-24 07:58:15 +00:00
Atsushi Eno d2a9a1a60e 2006-08-24 Atsushi Enomoto <[email protected]>
* Encoding.cs : implemented IsAlwaysNormalized().
	* Latin1Encoding.cs : IsAlwaysNormalized() does not return false
	  for FormC.


svn path=/trunk/mcs/; revision=64291
2006-08-24 07:50:23 +00:00
Kornél Pál 04ba68bae5 ASCIIEncoding.cs: Fixed GetString () methods to use ASCII rather than new string (sbyte*, int, int) that uses Encoding.Default.; Latin1Encoding.cs: Fixed GetString () methods to use Latin 1 rather than new string (sbyte*, int, int) that uses Encoding.Default.
svn path=/trunk/mcs/; revision=62703
2006-07-18 14:30:38 +00:00
Kornél Pál 55747d218d StringBuilder.cs: Pad the string with NULL characters when setting Length.
svn path=/trunk/mcs/; revision=62421
2006-07-11 00:55:09 +00:00