[Mono-bugs] [Bug 73212][Wis] New - UTF-7 encoding does not work properly

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 2 Mar 2005 07:15:12 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by svetlanaz@mainsoft.com.

http://bugzilla.ximian.com/show_bug.cgi?id=73212

--- shadow/73212	2005-03-02 07:15:12.000000000 -0500
+++ shadow/73212.tmp.31835	2005-03-02 07:15:12.000000000 -0500
@@ -0,0 +1,50 @@
+Bug#: 73212
+Product: Mono: Class Libraries
+Version: 1.0
+OS: 
+OS Details: Windows XP Professional Service Pack 2
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: svetlanaz@mainsoft.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Summary: UTF-7 encoding does not work properly
+
+Description of Problem:
+The UTF-7 encoder encodes extra '+', when the characters are encoded as 
+the shifted sequence with length more than 3 bytes. So, the decoder 
+decodes such sequences incorrect.
+
+Steps to reproduce the problem:
+public static void Main( String[] args )
+		{
+			Encoding utf = Encoding.UTF7;
+			string testChars = "rô\uFB2C\uFB2A\u05E9";
+
+			byte[] bytes = utf.GetBytes(testChars);
+			char[] chars = utf.GetChars(bytes);
+
+			foreach (char c in chars)
+			{
+				Console.Write("[{0:x4}] ", (int)c);
+			}
+
+			Console.WriteLine();
+		}
+ 
+
+Actual Results:
+[0072] [00f4] [fb2c] [fb2a] [002b] [0042] [0065] [006b] [002d]
+
+Expected Results:
+[0072] [00f4] [fb2c] [fb2a] [05e9]
+
+How often does this happen? 
+
+
+Additional Information: