A fix for bug #460229
* cs-tokenizer.cs: Ignore wrongly placed BOM markers.
svn path=/trunk/mcs/; revision=121810
+2008-12-18 Marek Safar <marek.safar@gmail.com>
+
+ A fix for bug #460229
+ * cs-tokenizer.cs: Ignore wrongly placed BOM markers.
+
2008-12-18 Marek Safar <marek.safar@gmail.com>
A fix for bug #459952
case '\v':
case 0xa0:
case 0:
+ case 0xFEFF: // Ignore BOM anywhere in the file
continue;
+/* This is required for compatibility with .NET
+ case 0xEF:
+ if (peek_char () == 0xBB) {
+ PushPosition ();
+ get_char ();
+ if (get_char () == 0xBF)
+ continue;
+ PopPosition ();
+ }
+ break;
+*/
case '\r':
if (peek_char () != '\n')
advance_line ();
error_details = ((char)c).ToString ();
return Token.ERROR;
}
-
+
return Token.EOF;
}