[Mono-dev] Default code page used by mcs

Kornél Pál kornelpal at hotmail.com
Wed Sep 28 05:50:28 EDT 2005


Hi,

I committed a patch that added /codepage to our mcs command line that I
missed for a long time. Now we don't have to specify the encoding we use in
mcs as we pass it on the command line.

So mcs can be modifed to use Encoding.Default as the default code page. I
think this is what most developers need as they edit their files using the
system code page and this is the behaviour of csc.exe as well.

Kornél

----- Original Message -----
From: "Atsushi Eno" <atsushi at ximian.com>
To: "Kornél Pál" <kornelpal at hotmail.com>
Cc: "mono-devel mailing list" <mono-devel-list at lists.ximian.com>
Sent: Wednesday, August 31, 2005 6:35 AM
Subject: Re: [Mono-dev] mcs patch to say goodbye to SeekableStreamReader


> Hi,
>
>> I tried your patch with ComIStreamMarshaler.cs and used -codepage:65001.
>> It
>> worked as expected but it fails with SVN head. The expected behaviour is
>> to
>> compile without errors so you patch solves the bug.
>
> Yep - now the fixed patch is going.
>
>> I've done some tests with files readed as UTF-8 but containing invalid
>> byte
>> sequences even with BOM and it worked as expected.
>
> Cool. Thanks for checking it :-)
>
>> I think the patch should be ported to gmcs as well.
>
> I'll ask Martin later.
>
>> I think we should return using Encoding.Default as the default encoding
>> in
>> mcs but should comfigure mcs using -codepage:28591 -codepage:1252 in
>> mcs/build to use that encoding.
>
> Maybe after 1.1.9 as Miguel suggested? I don't think the default
> encoding problem would happen only to mcs.
>
> Atsushi Eno
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>




More information about the Mono-devel-list mailing list