diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2003-03-06 02:45:51 +0300 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2003-03-06 02:45:51 +0300 |
commit | f3609d9a4f88c4999330c720e6211e39d9d25744 (patch) | |
tree | 8334953cc69d1a004dfcfd652edf60083be101ed | |
parent | 5ea869194c96a4e686eb3af81397dfcd88095ef6 (diff) |
2003-03-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* ASCIIEncoding.cs: fixed bug #38984.
svn path=/trunk/mcs/; revision=12235
-rwxr-xr-x | mcs/class/corlib/System.Text/ASCIIEncoding.cs | 5 | ||||
-rwxr-xr-x | mcs/class/corlib/System.Text/ChangeLog | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/mcs/class/corlib/System.Text/ASCIIEncoding.cs b/mcs/class/corlib/System.Text/ASCIIEncoding.cs index 449744f2a8f..4f07982e3c8 100755 --- a/mcs/class/corlib/System.Text/ASCIIEncoding.cs +++ b/mcs/class/corlib/System.Text/ASCIIEncoding.cs @@ -169,7 +169,10 @@ public class ASCIIEncoding : Encoding } int count = byteCount; while (count-- > 0) { - chars [charIndex++] = (char)(bytes [byteIndex++]); + char c = (char)(bytes [byteIndex++]); + if (c > 127) + c = '?'; + chars [charIndex++] = c; } return byteCount; } diff --git a/mcs/class/corlib/System.Text/ChangeLog b/mcs/class/corlib/System.Text/ChangeLog index eb0bc680a92..f555754acdd 100755 --- a/mcs/class/corlib/System.Text/ChangeLog +++ b/mcs/class/corlib/System.Text/ChangeLog @@ -1,3 +1,7 @@ +2003-03-05 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * ASCIIEncoding.cs: fixed bug #38984. + 2003-03-05 Aleksey Demakov <avd@openlinksw.com> * ASCIIEncoding.cs: |