[Mono-bugs] [Bug 57277][Wis] New - special characters bug

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 20 Apr 2004 13:21:05 -0400 (EDT)


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 yom@iaelu.net.

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

--- shadow/57277	2004-04-20 13:21:05.000000000 -0400
+++ shadow/57277.tmp.16628	2004-04-20 13:21:05.000000000 -0400
@@ -0,0 +1,101 @@
+Bug#: 57277
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: Crux 1.3 (crux.nu) / Kernel 2.6.5
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: yom@iaelu.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: special characters bug
+
+Description of Problem:
+There is a bug happening with special characters, anf for now it's
+happening with Console.ReadLine() and also with getting string objects from
+a database which contains special characters.
+So as an example, i'm getting the word Comédie (comedy, in french so with a
+stress upon the "e") and when i'm showing the length of the string and the
+string itself, i'm getting 6 (instead of 7) and Comdie (instead of Comédie)
+
+if you're looking to what "Comédie" should look like if you cannot see it
+correctly, just open a html file and put this >> Com&eacute;die << inside,
+then open the html file with your internet browser.
+
+Steps to reproduce the problem:
+Here is a little code example to get the bug : 
+
+##### Code from here #####
+using System;
+                                                                          
+                              
+public class Driver
+{
+        public static void Main(string[] args)
+        {
+                string tmp;
+
+                tmp = Console.ReadLine();
+                Console.WriteLine(tmp.Length.ToString());
+                Console.WriteLine(tmp);
+        }
+}
+##### Code ends here #####
+
+when you excute the program, just enter Comédie and type "Enter" key.
+
+Actual Results:
+For now, i'm getting :
+
+##### Resuls from here #####
+6
+Comdie
+##### Resuls from here #####
+
+Expected Results:
+##### Expected Resuls from here #####
+7
+Comédie
+##### Expected Resuls from here #####
+
+
+How often does this happen? 
+it's happening all the time with Console.ReadLine(), and also when i'm
+getting the string from a database.
+
+
+Additional Information:
+i've been testing with a little C program to see if that could come from my
+computer configuration, and it doesn't.
+here is the code, let's call it "special.c" :
+
+##### C Code from here #####
+#include <stdio.h>
+ 
+int main(int argc, char **argv)
+{
+        char tmp[20];
+ 
+        scanf("%s", tmp);
+        printf("%s : %d\n", tmp, strlen(tmp));
+
+        return(0);
+}
+##### C Code ends here #####
+
+to compile it :
+gcc special.c -o special
+
+then run it and do the same thing, so typing Comédie (Com&eacute;die is the
+html pendant if you want to see what it looks like) and then typing "Enter"
+key.
+the actual result of the C code is the correct one (cf. Expected results)
+
+
+I hope all these information would help you to find what's the problem.