[Mono-dev] [PATCH] Add default code page to build system

Kornél Pál kornelpal at hotmail.com
Tue Aug 30 12:21:47 EDT 2005


Hi,

Mono is an international project. This means that people all around the
world are hacking source code while using their own native code pages.

The problem is that sometimes there is a need to use non-ASCII characters.
When doing so it is important to compile source code using the same code
page as the file was saved.

I belive that using UTF-8 is the best solution but it needs some
modification to source code so currently we should continue to use
ISO-28591.

mcs should use Encoding.Default as the default encoding to provide csc.exe
compatiblity and I think this the default that most developers require but
in that case our build system will use different code pages on each system
so we have to specify a single code page for mcs to provide consistent
behaviour.

The current patch adds a CODEPAGE variable to build system that can be used
to override default code page.

CODEPAGE itself is used when creating command line arguments for compilers
and should be used when calling tools to process source code in case they
accept a code page.

I decided to use code page as the first parameter of compilers to can be
overrien using flags as well.

I don't insist on the actual layout of the solution but I belive that we
need a code page setting.

Please review the patch and approve it if it's OK.

Kornél
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DefaultCodePage.diff
Type: application/octet-stream
Size: 3482 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050830/c85220af/attachment.obj 


More information about the Mono-devel-list mailing list