[Mono-bugs] [Bug 77503][Cri] New - compiling file in ISO-8859-15 encoding with degree symbol character constant fails

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Feb 8 11:53:18 EST 2006


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 jo.vermeulen at gmail.com.

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

--- shadow/77503	2006-02-08 11:53:17.000000000 -0500
+++ shadow/77503.tmp.14418	2006-02-08 11:53:18.000000000 -0500
@@ -0,0 +1,63 @@
+Bug#: 77503
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: Ubuntu Breezy with Mono updates from apt.filefind.net
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Critical
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: jo.vermeulen at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: compiling file in ISO-8859-15 encoding with degree symbol character constant fails
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+When I try to compile a file, saved in the ISO-8859-15 encoding, which
+includes °, a degree symbol as a character, the compilation fails. It says
+that I entered an empty character constant. So it in fact skips that
+character while parsing, and thinks I entered an empty character constant. 
+
+When the file is saved in UTF-8 it works though.
+
+Steps to reproduce the problem:
+1. Write some C# code which uses a character constant with the degree symbol
+2. Try to compile it
+
+Actual Results:
+
+$ mcs EncodingBug.cs
+EncodingBug.cs(5,12): error CS1011: Empty character literal
+syntax error, got token `ERROR'
+EncodingBug.cs(5,12): error CS1002: Expecting `;'
+Compilation failed: 2 error(s), 0 warnings
+
+Expected Results:
+$ mcs EncodingBug.cs
+EncodingBug.cs(5,8): warning CS0219: The variable `a' is assigned but its
+value is never used
+Compilation succeeded - 1 warning(s)
+
+
+How often does this happen? 
+
+Always
+
+Additional Information:
+
+This is the test code I used:
+
+class EncodingBug
+{
+        public static void Main(string[] args)
+        {
+                char a = '°';
+        }
+}


More information about the mono-bugs mailing list