9524d217e75285a6777e485ae3845c5dafc71fea
[mono.git] / mcs / class / corlib / System.Text / ChangeLog
1 2005-11-14  Miguel de Icaza  <miguel@novell.com>
2
3         * ASCIIEncoding.cs, Encoding: Another snack, just a few methods
4         missing.  
5
6         Also add some checks that were missing.
7
8 2005-11-11  Sebastien Pouliot  <sebastien@ximian.com>
9
10         * StringBuilder.cs: Fix ISerializable.GetObjectData (remoting tests 
11         were failing under 2.0) and two possible integer overflow in CopyTo.
12
13 2005-11-11  Miguel de Icaza  <miguel@novell.com>
14
15         * Encoding.cs, UnicodeEncoding.cs: A few 2.x methods. 
16
17         * StringBuilder.cs (Text): Added serialization support in 2.x. 
18
19 2005-10-22  Jonathan Pryor  <jonpryor@vt.edu>
20
21         * UTF8Encoding.cs (InternalGetChars/InternalGetCharCount): Fix lead byte
22           check logic for 6 octet sequences.  ((ch & 0xFC) == 0xFC) is always true 
23           for 0xFF, even though 0xFF isn't a valid lead byte.  It should be 
24           ((ch & 0xFE) == 0xFC).
25
26 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
27
28         * UTF8Encoding.cs : (InternalGetChars/InternalGetCharCount):
29           Don't exclude FEFF in the resulting text.
30
31 2005-06-21  Ben Maurer  <bmaurer@ximian.com>
32
33         * StringBuilder.cs (Replace): Do the correct thing when we replace
34         with a longer string. Thanks to Alexander Beznozdrev
35         <abeznozdrev@croc.ru>
36
37 2005-05-26  Ben Maurer  <bmaurer@ximian.com>
38
39         * Encoding.cs: Use static object for locking. `volatile' to
40         prevent double checked locking error.
41
42         * StringBuilder.cs: Remove = null inits on fields, saves a few
43         instructions. When we compare _cached_str == _str, we are only
44         interested in pointer based equality, so just do that.
45
46 2005-05-06  Ben Maurer  <bmaurer@ximian.com>
47
48         * StringBuilder.cs (InternalEnsureCapacity): It is possible that
49         the size we attempt to grow to is more than the max capacity, but
50         that a smaller size will do. In this case, don't throw an
51         exception. Fixes #72244
52
53 2005-04-16  Atsushi Enomoto  <atsushi@ximian.com>
54
55         * NormalizationForm.cs : new file.
56
57 2005-03-20  Ben Maurer  <bmaurer@ximian.com>
58
59         * StringBuilder.cs (set_Length): If we set the length, we must
60         clobber the cached string.
61
62 2005-03-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
63
64         * UnicodeEncoding.cs: same fix (\uFEFF) but for Unicode. Patch by
65         Svetlana Zholkovsky.
66
67 2005-03-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
68
69         * UTF7Encoding.cs: fix for characters encoded as a shifted sequence
70         whose length is greater than 3. Patch by Svetlana Zholkovsky.
71
72 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
73
74         * StringBuilder.cs (Remove): We need to do the check that the
75         string isnt being cached *before* we munge it.
76
77 2005-01-21  Ben Maurer  <bmaurer@ximian.com>
78
79         * StringBuilder.cs: Don't allocate memory on the .ctor, do it
80         lazily. This saves us lots of memory if you only use the
81         stringbuilder once. Also, we can allocate on the second Append,
82         which might reduce the number of buffers allocated.
83
84 2005-01-14 Lluis Sanches Gual  <lluis@novell.com>
85
86         * StringBuilder.cs: Improved parameter check.
87
88 2005-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
89
90         * StringBuilder.cs: when creating the StringBuilder from a string, the
91         maximum capacity remains Int32.MaxValue.
92
93 2005-01-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
94
95         * StringBuilder.cs: throw if the new size is greater than the maximum
96         capacity for the StringBuilder. Patch by luke@octerbar.net. Fixes
97         bug #62422.
98
99 2004-12-15  Sebastien Pouliot  <sebastien@ximian.com>
100
101         * UTF7Encoding.cs:  Fixed warning for unused variable.
102
103 2004-09-30  Juraj Skripsky <js@hotfeet.ch>
104
105         * Encoding.cs: Add encoding name "latin1" for compatibility with
106         MS.NET.
107
108 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
109
110         * StringBuilder.cs (Append): Use InternalStrcpy to append char arrays.
111
112 2004-09-09  Tim Coleman <tim@timcoleman.com>
113
114         * StringBuilder.cs: Added AppendLine methods for Fx 2.0
115
116 2004-06-23  Sebastien Pouliot  <sebastien@ximian.com>
117
118         * UTF7Encoding.cs: Fixed decoding table. Fixed char count calculation.
119         Follow the RFC1642 rules for "overbits".
120
121 2004-06-15  Gert Driesen <drieseng@users.sourceforge.net>
122
123         * ASCIIEncoding.cs: added TODO for serialization
124         * StringBuilder.cs: added TODO for serialization
125         * UnicodeEncoding.cs: added TODO for serialization
126         * UTF7Encoding.cs: added TODO for serialization
127         * UTF8Encoding.cs: added TODO for serialization
128
129 2004-06-10  Gert Driesen <drieseng@users.sourceforge.net>
130
131         * Encoding.cs: Marked protected internal field as internal to
132         fix API signature
133
134 2004-06-07  Atsushi Enomoto  <atsushi@ximian.com>
135
136         * UTF8Encoding.cs : Length check must be done only when the character
137           sequence is valid (i.e. should not check when it is overlongs).
138           See also TestThrowOnInvalid().
139
140 2004-06-07  Atsushi Enomoto  <atsushi@ximian.com>
141
142         * UTF8Encoding.cs : Added Overlong check to InternalGetCharCount().
143
144 2004-06-07  Atsushi Enomoto  <atsushi@ximian.com>
145
146         * UTF8Encoding.cs : Throw overlongs error only when throwOnInvalid is
147           true. Otherwise just ignore them.
148
149 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
150
151         * StringBuilder.cs: Fixed potential integer overflows in several 
152         methods.
153
154 2004-05-14  Sebastien Pouliot  <sebastien@ximian.com>
155
156         * UTF8Encoding.cs: Moved charCount-- after the check for surrogate 
157         pair. This fix bug #57009 (and 2 failing unit tests). Added code
158         to check for some (like MS) overlongs.
159
160 2004-05-03 Lluis Sanches Gual  <lluis@ximian.com>
161
162         * Encoding.cs: Use name const to load I18N assembly.
163
164 2004-04-25  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
165
166         * Encoding.cs: Call shortcut String.ToLowerInvariant
167
168 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
169
170         * Encoding.cs: Use new internal codepage setup.
171
172 2004-04-10  Atsushi Enomoto  <atsushi@ximian.com>
173
174         * UTF7Encoding.cs : GetMaxByteCount() was based on incorrect formula.
175
176 2004-03-19  Dick Porter  <dick@ximian.com>
177
178         * UnicodeEncoding.cs: GetCharCount(), GetChars(): Check for the
179         BOM at the beginning of the range of characters we're interested
180         in, not at the beginning of the array.  Fixes bug 51531.
181
182 2004-03-10  Juraj Skripsky <juraj@hotfeet.ch>
183
184         * StringBuilder.cs
185         (Insert int, char[]): fix by using new string(char[]) instead of
186         char[].ToString() and simplify.
187         (Insert int, string, int): add LAMESPEC note.
188         (Insert int char[], int, int): handle value==null according to spec. 
189         Use a string instead of char array + Array.Copy (gonzalo)
190
191 2004-03-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
192
193         * StringBuilder.cs:
194         (Append (string)): remove redundant check.
195
196 2004-01-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
197
198         * StringBuilder.cs:
199         (Remove): fixed offsets when copying and set the new size. Fixes bug
200         #53240.
201
202 2004-01-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
203
204         * StringBuilder.cs: added checks for null in a few Append methods.
205
206 Tue Jan 13 22:23:25 CET 2004 Paolo Molaro <lupus@ximian.com>
207
208         * StringBuilder.cs: fixed start offset in Append(char).
209
210 2004-01-12  Patrik Torstensson
211
212         * StringBuilder.cs: new implementation that uses
213         string as a buffer instead of a array of chars.
214
215 2003-12-07 Ben Maurer  <bmaurer@users.sourceforge.net>
216
217         * UTF8Encoding.cs (GetBytes string): Do not call base
218         The version in Encoding will call string.ToCharArray (),
219         allocating an extra array. By calling the better method
220         in our own class we can save memory.
221
222 2003-11-17 Ben Maurer  <bmaurer@users.sourceforge.net>
223
224         * StringBuilder.cs (Insert int, char): It is really silly and
225         wasteful to allocate an array here. We can just copy the value
226         over.
227
228 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
229
230         * Encoding.cs: Use an internal variable to track the parameters of
231         each encoder, since the .NET API does not expose virtual methods
232         in the child classes, we should not depend on that.
233         
234         * ASCIIEncoding.cs, UTF7Encoding, UTF8Encoding, UnicodeEncoding:
235         Initialize the parameters for base class encoding here.
236
237 2003-09-01  Miguel de Icaza  <miguel@ximian.com>
238
239         * Encoding.cs (UTF8Unmarked): make it also not error out on
240         invalid input, that is what the Microsoft default is for the
241         StreamReader and BinaryReader expect (our main consumers).
242
243 2003-08-21 Ben Maurer  <bmaurer@users.sourceforge.net>
244
245         * StringBuilder.cs
246         (AppendFormat) Use FormatHelper in System.String to avoid
247         allocating an extra StringBuilder.
248         (Append string, int, int), (Append char, int): Both were
249         allocating extra strings.
250
251 2003-06-05  Nick Drochak  <ndrochak@gol.com>
252
253         * UTF8Encoding.cs: Cleanups according to class status page
254
255 2003-05-10  Miguel de Icaza  <miguel@ximian.com>
256
257         * Encoding.cs (GetEncoding): Add all the aliases documented in the
258         framework.  We were missing a few.
259         
260         Reorganize the table.  Also, convert the input name into the
261         lower-case - to _ before we compare against our table.
262         
263 2003-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
264
265         * StringBuilder.cs: fixed bug #41397.
266
267 2003-04-12  Miguel de Icaza  <miguel@ximian.com>
268
269         * Encoding.cs: Enabled the code paths that we did have commented
270         out, they seem to work now.
271
272 Fri Apr 11 08:29:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
273
274         * StringBuilder.cs: cache the result from ToString().
275
276 2003-03-18  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
277
278         * UnicodeEncoding.cs: changed WebName from unicodeFFFE to utf-16be.
279           (unicodeFFFE is MS compliant, but isn't valid IANA encoding name.)
280
281 2003-03-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
282
283         * ASCIIEncoding.cs: fixed bug #38984.
284
285 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
286
287         * ASCIIEncoding.cs:
288         * Latin1Encoding.cs: fix GetString (byte[]) and
289         GetString (byte[], int, int) for zero-length case.
290
291 2003-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
292
293         * Latin1Encoding.cs: added Serializable attribute.
294
295 2003-02-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
296
297         * Encoding.cs: removed UnixConsoleEncoding.
298
299 2003-01-30  Zoltan Varga  <vargaz@freemail.hu>
300
301         * StringBuilder.cs: fix the constructor: 'value' can be NULL,
302         'capacity' must be >=0, use defaultCapacity only if capacity equals 0.
303         This fixes the StringBuilder unit tests.
304
305 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
306
307         * StringBuilder.cs: fixed typo in set_Length.
308
309 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
310
311         * Encoding.cs: g_get_encoding () returns "ASCII". In Default, when the
312         encoding is not found, default to UTF8Unmarked. Removed comment in
313         UnixConsoleEncoding, because it's now Default, which gets the 
314         encoding internally using g_get_encoding ().
315
316 2002-12-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
317
318         * StringBuilder.cs: fixed constructor. Thanks to marcusU for reporting.
319
320 Tue Nov 19 13:03:27 CET 2002 Paolo Molaro <lupus@ximian.com>
321
322         * UTF8Encoding.cs: fix GetByteCount (), too.
323
324 2002-11-19  Miguel de Icaza  <miguel@ximian.com>
325
326         * UnicodeEncoding.cs: the bytemark should only be used to return
327         information in GetPreamble, not to actually encode the information
328         on the stream.  That is taken care of by the Stream classes.
329
330         * UTF8Encoding.cs: ditto.
331
332 2002-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
333
334         * StringBuilder.cs: only move the remaining chars in Remove.
335
336 2002-11-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
337
338         * Encoding.cs: unixConsoleEncoding is now the same as Default. Avoid
339         locking whenever possible.
340
341 2002-10-30  Miguel de Icaza  <miguel@ximian.com>
342
343         * Encoding.cs (UTF8Unmarked): New static property, used to return
344         a no-markers UTf8 encoder, used in a few places in the class library.
345
346 2002-09-06  Miguel de Icaza  <miguel@ximian.com>
347
348         * Encoding.cs (UTF8, Unicode): Create with a preamble, that is
349         what the Microsoft version does.
350
351         (UnixConsoleEncoding): New internal method, used to get the
352         encoding, in the future, this should pull the locale, map to
353         charset and then code page. 
354
355 Wed Sep 4 14:01:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
356
357         * Encoding.cs: use icall to get default codepage.
358         * DefaultEncoding.cs: remove useless class.
359
360 Mon Aug 26 16:44:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
361
362         * *.cs: change to conform to mono coding style.
363
364 2002-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
365
366         * ASCIIEncoding.cs:
367         * Decoder.cs:
368         * Encoder.cs:
369         * Encoding.cs:
370         * UTF7Encoding.cs:
371         * UTF8Encoding.cs:
372         * UnicodeEncoding.cs: added Serializable attribute.
373
374 2002-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
375
376         * StringBuilder.cs: improved performace by using String.InternalCopyTo
377         instead of using ToCharArray all over the place (more that 50% of
378         speed improvement when using Append).
379
380 Wed Aug 21 20:02:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
381
382         * *.cs: imported the code donated by Rhys Weatherley
383         <rweather@southern-storm.com.au>.
384
385 2002-08-18  Dick Porter  <dick@ximian.com>
386
387         * Encoding.cs: Make GetString() return a useful representation of
388         the bytes, rather than "System.Char[]"
389
390 2002-08-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
391
392         * StringBuilder.cs: added IndexerName to indexer.
393
394 2002-08-01  Jason Diamond <jason@injektilo.org>
395
396         * Encoding.cs: Use GetByteCount instead of GetMaxByteCount when
397         converting chars to bytes.
398
399 2002-07-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
400
401         * StringBuilder.cs: updated comments. MaxCapacity always returns
402         Int32.MaxValue.
403
404 2002-06-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
405
406         * StringBuilder.cs: implemented AppendFormat methods using
407         String.Format. Thanks Paolo!
408
409         This makes xsp generate correct C# output in linux :-). I still need
410         to do more testing, though.
411
412 Mon Jun 3 12:58:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
413
414         * ASCIIEncoding.cs: fixed handling of 0 bytecount.
415
416 2002-05-19  Martin Baulig  <martin@gnome.org>
417
418         * Encoder.cs (IConvEncoder.GetByteCount, IConvEncoder.GetBytes):
419         Added exception handling.
420
421         * Decoder.cs (IConvDecoder.GetCharCount, IConvDecoder.GetChars):
422         Added exception handling.
423
424 2002/04/02  Nick Drochak <ndrochak@gol.com>
425
426         * StringBuilder.cs (Append): Removed obsolete overload.
427
428 2002-03-21  Mike Kestner  <mkestner@speakeasy.net>
429
430         * ASCIIEncoding.cs : Fix off by one error in Get(Char|Byte)Count.
431
432 Thu Mar 21 17:38:19 CET 2002 Paolo Molaro <lupus@ximian.com>
433
434         * StringBuilder.cs: no need to intern the string returned by ToString().
435
436 2002-03-17  Mike Kestner  <mkestner@speakeasy.net>
437
438         * ASCIIEncoding.cs: Implement all the overridden methods. No longer
439           dependent on iconv icalls.
440         * Encoding.cs: Fix count bugs in GetBytes and GetChars. Add virtual
441           to GetBytes.
442
443 Wed Mar 13 00:26:29 CET 2002 Paolo Molaro <lupus@ximian.com>
444
445         * StringBuilder.cs: make ToString() return a interned string, this
446         seems to be required to make switch on string work.
447
448 Fri Mar 8 17:29:58 CET 2002 Paolo Molaro <lupus@ximian.com>
449
450         * StringBuilder.cs: make Append(char) do the smart thing.
451
452 2002-01-05  Ravi Pratap  <ravi@ximian.com>
453
454         * ASCIIEncoding.cs, Encoding.cs, UTF7Encoding.cs, 
455         UnicodeEncoding.cs: MonoTODO attribute marking.
456
457         * StringBuilder.cs : Ditto.
458         
459 Wed Nov 14 17:05:22 CET 2001 Paolo Molaro <lupus@ximian.com>
460
461         * Encoding.cs: renamed some fields.
462         * StringBuilder.cs: CLSCompliant updates.
463
464 2001-10-29  Nick Drochak  <ndrochak@gol.com>
465
466         * StringBuilder.cs: Throw exceptions when constructor paramter(s) are
467                 invalid. Just like MS does (as best as I can tell).
468
469         Tests for these exceptions are now added to the unit tests as well.
470
471 2001-10-25  Nick Drochak  <ndrochak@gol.com>
472
473         * StringBuilder.cs: Throw exception if they try to make a StringBuilder
474                 whose capacity is greater than the MaxCapacity.
475
476         I added some tests for the constructors and the above exception. More
477         coming soon.
478
479 2001-10-23  Nick Drochak  <ndrochak@gol.com>
480
481         * StringBuilder.cs: Refactored constructor code into just one
482         constructor. All the other construtors call it. Also supplied missing
483         constructors so the class has all those in the spec.
484
485         Added the MaxCapacity property as well, however this needs to be 
486         completed to return a value is related to the available system memory.
487
488 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
489
490         * Encoding.cs, UTF8Encoding.cs, UTF7Encoding.cs, ASCIIEncoding.cs,
491         UnicodeEncoding.cs: Corrected API.
492
493         * UTF8Encoding.cs: Checked in changes from Rafael.
494
495 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
496
497         * UTF8Encoding.cs: impl. clumsy GetBytes
498
499 2001-07-16  Marcin Szczepanski <marcins@zipworld.com.au>
500
501         * StringBuilder.cs (Text): Fixed.
502
503         * StringBuilderTest.cs: Implement Test suite.
504
505 2001-07-12  Marcin Szczepanski <marcins@zipworld.com.au>
506
507         * StringBuilder.cs: Implemented.
508
509         The only methods left unimplemented are the AppendFormat( ... )
510         ones just because it's probably better to wait until some of the
511         Format related classes are implemented.  I've put that as a TODO
512         comment at the top and created the methods with a "nop" body.
513
514 2001-06-26  Sean MacIsaac  <macisaac@ximian.com>
515
516         * UnicodeEncoding.cs: Members added so that a clean compile is
517         possible.
518
519         * ASCIIEncoding.cs: Members added so that a clean compile is
520         possible.
521
522         * UTF7Encoding.cs: Members added so that a clean compile is
523         possible.
524
525         * UTF8Encoding.cs: Members added so that a clean compile is
526         possible.
527
528         * Encoding.cs: All public members included.  Most members
529         unimplemented.