Commit Graph
66 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
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
Miguel de Icaza c6e197166f Add support for detecting UTF32 and UTF-32 bigendian
patch from  Peter Dettman ([email protected])


svn path=/trunk/mcs/; revision=73779
2007-03-06 04:26:50 +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 594236a635 Fixed typo.
svn path=/trunk/mcs/; revision=72056
2007-01-31 21:37:23 +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
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
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 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 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
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
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 3c311bcdc0 2006-01-20 Atsushi Enomoto <[email protected]>
* Encoding.cs : Cloned instances should not be read-only.

	* UTF8EncodingTest.cs : added CloneNotReadOnly().


svn path=/trunk/mcs/; revision=55823
2006-01-20 08:21:53 +00:00
Atsushi Eno 2a67cdf5a9 2005-12-08 Atsushi Enomoto <[email protected]>
* Encoding.cs : now under 2.0 GetBytes(string,...) dispatches to
	  byte*-based GetBytes().
	* UTF8Encoding.cs : avoid extraneous DecoderFallbackBuffer creation
	  which came to happen after introducing fallback buffer.


svn path=/trunk/mcs/; revision=54109
2005-12-08 11:59:32 +00:00
Atsushi Eno c4c148abc8 2005-11-28 Atsushi Enomoto <[email protected]>
* Encoding.cs, ASCIIEncoding.cs, Latin1Encoding.cs :
	  Added IsSingleByte.

	* ByteEncoding.cs : added IsSingleByte.


svn path=/trunk/mcs/; revision=53551
2005-11-28 12:55:44 +00:00
Atsushi Eno 9c2d2b4bea 2005-11-28 Atsushi Enomoto <[email protected]>
* Encoding.cs : added UTF32.


svn path=/trunk/mcs/; revision=53539
2005-11-28 05:10:05 +00:00
Atsushi Eno caeaed1076 2005-11-22 Atsushi Enomoto <[email protected]>
* ASCIIEncoding.cs, Latin1Encoding.cs : added EncoderFallback support.
	* Encoding.cs : changed default fallback selection. Seems like only
	  ASCII and GB18030 uses '?' for replacement.
	* UTF8Encoding.cs : now that Fallback is read only by default, we
	  need special setter.

	* EncoderReplacementFallbackTest.cs :
	  Added Latin1 replacement test.
	  Updated some test results changed from beta2 to RTM.
	* DecoderReplacementFallbackTest.cs : the same updates.


svn path=/trunk/mcs/; revision=53350
2005-11-22 17:19:45 +00:00
Raja R Harinath ffa3d54b36 Make line-endings uniform
svn path=/trunk/mcs/; revision=53295
2005-11-21 06:05:42 +00:00
Atsushi Eno 418222a64d 2005-11-15 Atsushi Enomoto <[email protected]>
* Encoding.cs : added ICloneable, Clone() and new GetEncoding().


svn path=/trunk/mcs/; revision=53052
2005-11-15 12:47:46 +00:00
Atsushi Eno 86544b0077 2005-11-15 Atsushi Enomoto <[email protected]>
* corlib_test.dll.sources: added new tests for
	  DecoderReplacementFallback and EncoderReplacementFallback.

	* Encoding.cs : Added IsReadOnly, DecoderFallback and EncoderFallback.
	* Encoder.cs : Added Fallback property.
	* Decoder.cs : Added Fallback property.

	* TestEncoding.cs,
	  DecoderReplacementFallbackTest.cs,
	  EncoderReplacementFallbackTest.cs : new 2.0 tests.


svn path=/trunk/mcs/; revision=53050
2005-11-15 12:12:12 +00:00
Miguel de Icaza 8d2e3b6a95 2005-11-14 Miguel de Icaza <[email protected]>
* ASCIIEncoding.cs, Encoding: Another snack, just a few methods
	missing.  

	Also add some checks that were missing.


svn path=/trunk/mcs/; revision=53033
2005-11-14 22:37:32 +00:00
Miguel de Icaza 1a5c713548 Just a snack:
2005-11-11  Miguel de Icaza  <[email protected]>

	* Encoding.cs, UnicodeEncoding.cs: A few 2.x methods. 

	* StringBuilder.cs (Text): Added serialization support in 2.x. 


svn path=/trunk/mcs/; revision=52916
2005-11-11 16:43:36 +00:00
Ben Maurer d71e3b486b * Encoding.cs: Use static object for locking. `volatile' to
prevent double checked locking error.


svn path=/trunk/mcs/; revision=45078
2005-05-26 20:22:18 +00:00
Raja R Harinath e0cfa4925e Set svn:eol-style=native, delete svn:executable.
Fix line endings of System/Decimal.cs (only actual "change" in text, to force recompile of mscorlib to reflect changes in decimal constant handling in the compiler)


svn path=/trunk/mcs/; revision=44558
2005-05-16 12:23:26 +00:00
Juraj Skripsky 3b4ac0045d 2004-09-30 Juraj Skripsky <[email protected]>
* Encoding.cs: Add encoding name "latin1" for compatibility with
	MS.NET.

svn path=/trunk/mcs/; revision=35501
2004-10-30 12:18:18 +00:00
Miguel de Icaza a8dea00dfb Fixed licenses
svn path=/trunk/mcs/; revision=30382
2004-06-25 14:42:22 +00:00
Duncan Mak 13d1764537 Add license and copyright to all source files in corlib
svn path=/trunk/mcs/; revision=29249
2004-06-11 02:09:36 +00:00
Gert Driesen aeed334240 * Encoding.cs: Marked protected internal field as internal to
fix API signature

svn path=/trunk/mcs/; revision=29207
2004-06-10 17:19:58 +00:00
Miguel de Icaza 2de4a59cd2 Map our internal codes to the C# codes
svn path=/trunk/mcs/; revision=26714
2004-05-04 19:23:48 +00:00
Lluis Sanchez f1e94cf35b * Encoding.cs: Use name const to load I18N assembly.
svn path=/trunk/mcs/; revision=26642
2004-05-03 20:36:08 +00:00
Andreas N 978da5becb 2004-04-25 Andreas Nahr <[email protected]>
* Encoding.cs: Call shortcut String.ToLowerInvariant

svn path=/trunk/mcs/; revision=25948
2004-04-25 11:39:54 +00:00
Miguel de Icaza 5546279737 2004-04-13 Miguel de Icaza <[email protected]>
* Console.cs: Use new codepage setup.

2004-04-13  Miguel de Icaza  <[email protected]>

        * Encoding.cs: Use new internal codepage setup.

svn path=/trunk/mcs/; revision=25434
2004-04-13 20:19:08 +00:00
Miguel de Icaza dc6ab5e52e 2003-11-13 Miguel de Icaza <[email protected]>
* Console.cs: On utf-8 consoles, use unmarked output.

svn path=/trunk/mcs/; revision=19981
2003-11-14 02:47:53 +00:00
Miguel de Icaza 3d0638b95e 2003-11-11 Miguel de Icaza <[email protected]>
* Encoding.cs: Use an internal variable to track the parameters of
	each encoder, since the .NET API does not expose virtual methods
	in the child classes, we should not depend on that.

	* ASCIIEncoding.cs, UTF7Encoding, UTF8Encoding, UnicodeEncoding:
	Initialize the parameters for base class encoding here.

svn path=/trunk/mcs/; revision=19843
2003-11-11 22:54:18 +00:00
Miguel de Icaza 7fe89c4676 2003-09-01 Miguel de Icaza <[email protected]>
* Encoding.cs (UTF8Unmarked): make it also not error out on
	invalid input, that is what the Microsoft default is for the
	StreamReader and BinaryReader expect (our main consumers).

svn path=/trunk/mcs/; revision=17807
2003-09-01 21:45:09 +00:00
Miguel de Icaza 210c381642 2003-05-10 Miguel de Icaza <[email protected]>
* Encoding.cs (GetEncoding): Add all the aliases documented in the
	framework.  We were missing a few.

	Reorganize the table.  Also, convert the input name into the
	lower-case - to _ before we compare against our table.

svn path=/trunk/mcs/; revision=14472
2003-05-11 01:43:08 +00:00
Miguel de Icaza 84355e9716 2003-04-12 Miguel de Icaza <[email protected]>
* Encoding.cs: Enabled the code paths that we did have commented
	out, they seem to work now.

svn path=/trunk/mcs/; revision=13567
2003-04-12 19:33:25 +00:00
Gonzalo Paniagua Javier 9119c83a15 2003-02-03 Gonzalo Paniagua Javier <[email protected]>
* System/AppDomain.cs: implemented AppendPrivatePath, ClearPrivatePath
	and ClearShadowCopyPath and fixed GetType ().

	* System/Attribute.cs: clean up.

	* System/Console.cs: removed UnixConsoleEncoding. Use Default.
	* System.IO/MemoryStream.cs: create the buffer of the specified capacity.
	* System.Text/Encoding.cs: removed UnixConsoleEncoding.

svn path=/trunk/mcs/; revision=11147
2003-02-03 02:38:48 +00:00
Gonzalo Paniagua Javier 40f19f2cdf 2002-12-12 Gonzalo Paniagua Javier <[email protected]>
* Encoding.cs: g_get_encoding () returns "ASCII". In Default, when the
	encoding is not found, default to UTF8Unmarked. Removed comment in
	UnixConsoleEncoding, because it's now Default, which gets the
	encoding internally using g_get_encoding ().

svn path=/trunk/mcs/; revision=9584
2002-12-12 04:26:24 +00:00
Gonzalo Paniagua Javier 9c97ce1732 2002-11-05 Gonzalo Paniagua Javier <[email protected]>
* Encoding.cs: unixConsoleEncoding is now the same as Default. Avoid
	locking whenever possible.

svn path=/trunk/mcs/; revision=8844
2002-11-06 00:07:30 +00:00
Miguel de Icaza 00c2299b17 2002-10-30 Miguel de Icaza <[email protected]>
* Encoding.cs (UTF8Unmarked): New static property, used to return
	a no-markers UTf8 encoder, used in a few places in the class library.

svn path=/trunk/mcs/; revision=8684
2002-10-31 00:45:59 +00:00
Miguel de Icaza 2eefff50b3 2002-09-06 Miguel de Icaza <[email protected]>
* Console.cs: Specify an encoder, otherwise we will get the UTF8
	encoder that by default emits the byte markers.

2002-09-06  Miguel de Icaza  <[email protected]>

	* StreamReader.cs: Implement detection of byte marks and skipping
	of byte marks at the beginning of the stream.

	(ReadToEnd): Use buffered read instead of char-by-char
	processing.

	Correct the default arguments for creating the StreamReader.

2002-09-06  Miguel de Icaza  <[email protected]>

	* Encoding.cs (UTF8, Unicode): Create with a preamble, that is
	what the Microsoft version does.

	(UnixConsoleEncoding): New internal method, used to get the
	encoding, in the future, this should pull the locale, map to
	charset and then code page.

svn path=/trunk/mcs/; revision=7295
2002-09-06 23:57:02 +00:00
Paolo Molaro 9de3cc5947 Wed Sep 4 14:01:25 CEST 2002 Paolo Molaro <[email protected]>
* Encoding.cs: use icall to get default codepage.
	* DefaultEncoding.cs: remove useless class.

svn path=/trunk/mcs/; revision=7238
2002-09-04 12:04:16 +00:00
Paolo Molaro 6c10f94827 Mon Aug 26 16:44:54 CEST 2002 Paolo Molaro <[email protected]>
* *.cs: change to conform to mono coding style.

svn path=/trunk/mcs/; revision=7050
2002-08-26 14:46:37 +00:00