Commit Graph
172 Commits
Author SHA1 Message Date
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
Kornél Pál ae88ac9013 MLangCodePageEncoding.cs: Removed unnesessary ArgumentExceptions in private constructors.
svn path=/trunk/mcs/; revision=62320
2006-07-06 15:27:10 +00:00
Kornél Pál 220115aa09 Corrected comments.
svn path=/trunk/mcs/; revision=62316
2006-07-06 14:27:38 +00:00
Kornél Pál f07eb9cdc8 CodePageEncoding.cs: Return the same real object in subsequent calls to GetRealObject ().; MLangCodePageEncoding.cs: Return the same real object in subsequent calls to GetRealObject (). Rename Encoder and Decoder MLangEncoder and MLangDecoder. These classes are not serializable in 1.x although MS.NET 2.0 can deserialize them.; SurrogateEncoder.cs: Return the same real object in subsequent calls to GetRealObject ().
svn path=/trunk/mcs/; revision=62274
2006-07-05 19:24:01 +00:00
Kornél Pál 450c7645cb Added comments on using serialization proxy classes.
svn path=/trunk/mcs/; revision=62239
2006-07-04 09:04:55 +00:00
Kornél Pál 7db8cd0a57 Added encoding deserialization support classes.
svn path=/trunk/mcs/; revision=62235
2006-07-03 19:58:11 +00:00
Atsushi Eno f401f441a3 2006-06-27 Atsushi Enomoto <[email protected]>
* EncodingInfo.cs : EncodingName is WebName, not EncodingName.


svn path=/trunk/mcs/; revision=62079
2006-06-27 16:52:12 +00:00
Kornél Pál 6f6b457056 UnicodeEncoding.cs: Don't detect byte order. Only readers like StreamReader detect byte order marks.
svn path=/trunk/mcs/; revision=62006
2006-06-24 12:59:07 +00:00
Kornél Pál b504254e01 Encoding.cs: Return big-endian UTF-32 in GetEncodings () and GetEncoding (int)
svn path=/trunk/mcs/; revision=61919
2006-06-21 21:47:43 +00:00
Kornél Pál cade45ba05 UnicodeEncoding.cs: Override GetString (byte [], int, int) in profile 1.x as well because performance improvement is worth the signature difference. (Fix regression of r61250.)
svn path=/trunk/mcs/; revision=61502
2006-06-06 20:00:08 +00:00
Gert Driesen b136e2077e * ASCIIEncoding.cs: Marked class ComVisible (true) on 2.0 profile.
Marked 2.0-only members as ComVisible (false).
* Decoder.cs: Marked class ComVisible (true) on 2.0 profile. Marked
2.0-only members as ComVisible (false).
* Encoder.cs: Marked class ComVisible (true) on 2.0 profile. Marked
2.0-only members as ComVisible (false).
* Encoding.cs: Marked class ComVisible (true) on 2.0 profile. Marked
2.0-only members as ComVisible (false).
* NormalizationForm.cs: Marked ComVisible (true).
* StringBuilder.cs: Marked class ComVisible (true) on 2.0 profile.
Marked 2.0-only methods as ComVisible (false).
* UnicodeEncoding.cs: GetString (byte[], int, int) is only available
in 2.0 profile. Marked 2.0-only methods ComVisible (false). Added
missing ctor in 2.0 profile, and marked in MonoTODO.
* UTF7Encoding.cs: Marked class ComVisible (true) on 2.0 profile.
* UTF8Encoding.cs: Marked 2.0-only methods as ComVisible (false).

svn path=/trunk/mcs/; revision=61250
2006-05-30 09:02:37 +00:00
Atsushi Eno f943aba680 2006-05-25 Atsushi Enomoto <[email protected]>
* corlib_test.dll.sources : added EncodingInfoTest.cs.

	* EncodingInfo.cs, Encoding.cs :
	  Implemented Encoding.GetEncodings(). It's so hacky!

	* EncodingInfoTest.cs : new TestFixture.


svn path=/trunk/mcs/; revision=61128
2006-05-25 16:51:36 +00:00
Kornél Pál 8bc62b2049 * Encoding.cs: GetString (byte []): Wrap GetString (byte [], int, int) as MS.NET does. This is a more reasonable high level wrapper implementation.; * UnicodeEncoding.cs: GetBytes (string): Implement as a wrapper instead of using GetBytesInternal to be MS.NET compatible. Override GetString (byte [], int, int) to speed up string creation.
svn path=/trunk/mcs/; revision=59437
2006-04-13 11:08:04 +00:00
Atsushi Eno 8e3081f83f 2006-04-13 Atsushi Enomoto <[email protected]>
* ASCIIEncoding.cs : 2.0 decoder fallback support was missing.

        * ASCIIEncodingTest.cs : added DecoderFallback().


svn path=/trunk/mcs/; revision=59434
2006-04-13 08:14:42 +00:00
Atsushi Eno 20ef4631cf 2006-03-30 Atsushi Enomoto <[email protected]>
* Encoder.cs, Decoder.cs : implemented Convert(). Also added argument
	  check in some methods.

	* EncoderTest.cs, DecoderTest.cs : new tests, for Convert().

	* corlib_test.dll.sources: added EncoderTest.cs and DecoderTest.cs.


svn path=/trunk/mcs/; revision=58819
2006-03-30 19:08:18 +00:00
Atsushi Eno d292a48aca 2006-03-30 Atsushi Enomoto <[email protected]>
* ASCIIEncoding.cs : added overriden methods in NET_2_0 (maybe
	  there are optimizations, but for now we need something just works).


svn path=/trunk/mcs/; revision=58818
2006-03-30 19:05:10 +00:00
Atsushi Eno abcea4f6f0 2006-03-24 Atsushi Enomoto <[email protected]>
* UTF8Encoding.cs : made internal implementation as pointer-based,
	  and added pointer-based converter method overloads.


svn path=/trunk/mcs/; revision=58408
2006-03-24 11:20:24 +00:00
Kornél Pál 9876fe6d42 * String.cs: Make memcpy4 private as it is a helper method. Make memcpy internal to can be used from UnicodeEncoding.; * UnicodeEncoding.cs: Use unsafe code for copying characters to speed up conversion.
svn path=/trunk/mcs/; revision=58213
2006-03-21 02:59:24 +00:00
Zoltan Varga ad6cf59a62 2006-03-09 Zoltan Varga <[email protected]>
* Encoding.cs: Add stub for net 2.0 GetEncodings () method.

svn path=/trunk/mcs/; revision=57744
2006-03-09 19:23:21 +00:00
Atsushi Eno ce4d8a502d 2006-02-14 Atsushi Enomoto <[email protected]>
* UTF8Encoding.cs : Fallback was indicating incorrect index.
	  Fixed bug #77550.

	* UTF8EncodingTest.cs : test for bug #77550.


svn path=/trunk/mcs/; revision=56848
2006-02-14 10:31:51 +00:00
Atsushi Eno 517e5a950f 2006-02-10 Atsushi Enomoto <[email protected]>
* ASCIIEncoding.cs : (GetChars) reduced either one store or one jump
	  in IL. 10% performance improvement.


svn path=/trunk/mcs/; revision=56762
2006-02-10 17:06:40 +00:00
Atsushi Eno d6d80fd7c1 2006-02-03 Atsushi Enomoto <[email protected]>
* UTF8Encoding.cs : avoid possible overflow.


svn path=/trunk/mcs/; revision=56535
2006-02-03 17:05:10 +00:00
Atsushi Eno e85a1fe77c 2006-02-03 Atsushi Enomoto <[email protected]>
* UTF8Encoding.cs : In zero-charbuffer case, byte buffer count should
	  be checked. Also it should not ignore leftOver characters even if
	  byte buffer length is 0.

	* UTF8EncodingTest.cs : added test for insufficient bytes for
	  flush=true and leftOver!='\0' case.


svn path=/trunk/mcs/; revision=56533
2006-02-03 16:54:56 +00:00
Atsushi Eno 1d4633d57d 2006-02-03 Atsushi Enomoto <[email protected]>
* UTF8Encoding.cs : Fast path optimization for InternalGetByteCount()
	  and InternalGetBytes().


svn path=/trunk/mcs/; revision=56518
2006-02-03 11:59:07 +00:00
Atsushi Eno 90f44f360a 2006-02-02 Atsushi Enomoto <[email protected]>
* UTF8Encoding.cs :
	  actually leftover bits needs more careful handleding. So it's
	  better to be rather close to the original GetBytes().
	  Also changed leftOver handling so that it will be able to support
	  fallback.


svn path=/trunk/mcs/; revision=56516
2006-02-03 10:37:42 +00:00
Atsushi Eno c9bb7c1bc1 2006-02-02 Atsushi Enomoto <[email protected]>
* UTF8Encoding.cs :
	  GetBytes(string, ...) could reuse InternalGetBytes() using fixed
	  pointers. However, InternalGetBytes() was slower than
	  GetBytes(string, ...), so first replaced existing InternalGetBytes()
	  with GetBytes() internals, and GetBytes(string, ...) switched to 
	  InternalGetBytes(). Now GetBytes() implementation code is reduced
	  to one method.


svn path=/trunk/mcs/; revision=56509
2006-02-03 07:55:02 +00:00
Atsushi Eno da8fc189ae 2006-02-02 Atsushi Enomoto <[email protected]>
* UTF8Encoding.cs : fast path optimization was pretty insufficient.
	  Now it handles the entire bytes, not just half of them.


svn path=/trunk/mcs/; revision=56449
2006-02-02 11:16:33 +00:00
Atsushi Eno 8d3b321d8c 2006-02-02 Atsushi Enomoto <[email protected]>
* UTF8Encoding.cs : zero-length check was wrong. Check it by
	  "charIndex == chars.Length" instead of "charCount == 0".


svn path=/trunk/mcs/; revision=56448
2006-02-02 11:01:21 +00:00
Atsushi Eno eac1005552 2006-02-02 Atsushi Enomoto <[email protected]>
* UTF8Encoding.cs : switched GetBytes() to pointer-based code.
	  Implemented 2.0 pointer-based GetBytes(). 10% perf. improvement.


svn path=/trunk/mcs/; revision=56447
2006-02-02 10:54:24 +00:00
Atsushi Eno 5ccd6179af 2006-01-30 Atsushi Enomoto <[email protected]>
* UTF8Encoding.cs : InternalGetCharCount() optimization again, and
	  this time InternalGetChars() as well.


svn path=/trunk/mcs/; revision=56251
2006-01-30 14:29:56 +00:00
Miguel de Icaza 929bb68814 Apply patch from Mike Glenn\n2006-01-24 Mike Glenn <[email protected]>
* StringBuilder.cs: Avoid computing computation for the string
	length twice.

svn path=/trunk/mcs/; revision=56001
2006-01-24 20:04:42 +00:00