[Mono-devel-list] encoding problem

Gonzalo Paniagua Javier gonzalo at ximian.com
Wed May 26 12:35:19 EDT 2004


El mié, 26-05-2004 a las 18:18, bopm escribió:
> Ok, what I get. If I build from utf-8 encoded fileI get this one:
> --cut--
> mcs /t:library /out:bin/WebApplication2.dll -r:System.Web -r:System.Data 
> -r:System.Drawing AssemblyInfo.cs WebForm1.aspx.cs ShowPanel.aspx.cs 
> Rotator.ascx.cs ImageButton.aspx.cs Global.asax.cs -codepage:"utf8"
> syntax error, got token `ERROR', expecting ABSTRACT AS EXTERN INTERNAL IS 
> NEW OPERATOR OVERRIDE PRIVATE PROTECTED PUBLIC READONLY SEALED STATIC THIS 
> UNSAFE VIRTUAL VOLATILE OPEN_BRACE CLOSE_BRACE OPEN_BRACKET CLOSE_BRACKET 
> OPEN_PARENS CLOSE_PARENS DOT COMMA COLON SEMICOLON OP_LT OP_GT BITWISE_AND 
> BITWISE_OR STAR CARRET INTERR OP_LE OP_GE OP_EQ OP_NE OP_AND OP_OR 
> IDENTIFIER
> Mono.CSharp.yyParser.yyException: irrecoverable syntax error
> in <0x0087e> Mono.CSharp.CSharpParser:yyparse 
> (Mono.CSharp.yyParser.yyInput)
> in <0x00079> Mono.CSharp.CSharpParser:parse ()
> 
> Rotator.ascx.cs(1) error CS8025: Parsing error
> Compilation failed: 1 error(s), 0 warnings

May be your files don't have the UTF8 mark bytes at the beginning.

> --Cut--
> Another question: mcs --help won't get me explaination about type 
> of that codepage 
> id. If I try something like -codepage:ru_RU.CP1251 I get error CS2016: 
> Code page '-1' is invalid or not installed.
<snip>
   -codepage:ID       Sets code page to the one in ID
                      (number, `utf8' or `reset')
</snip>

ID must be either utf8, reset or a number. In your case: -codepage:1251

-Gonzalo




More information about the Mono-devel-list mailing list