[Mono-osx] How to specify NAnt to use UTF8 encoding for compiling UTF8 encoded source files (c#)?

Nick Ifloat ifloat at gmail.com
Mon Dec 8 10:23:38 EST 2008


My C# source files have been properly saved in utf8 encoding/codepage format.
I have been trying for some times to get the nant build process to compile
my source files using utf8 encoding. After some googling I was able to come
up with the following (that I have to pass the codepage parameter to nant) -
but still my unicode strings shows up as "????" marks. Following is the
compile source files section of my nant.build file. Please help me to get
nant to compile my unicode utf8 source files in utf8 codepage/encoding.


<!-- Compile source files -->
    <csc codepage="utf8" target="exe" output="${build.dir}/${app.name}.exe">
      <sources>
        <include name="**/*.cs"/>
      </sources>
      <references basedir="${lib.dir}">
        <include name="Monobjc.dll"/>
        <include name="Monobjc.Cocoa.dll"/>
        <include name="FirebirdSql.Data.FirebirdClient.dll"/>
        <include name="System.Data.dll"/>
      </references>
    </csc>

PS. - I am using the latest monobjc here with the latest mono build. And
also I could use the gmcs -codepage:utf8 to properly compile my source files
when I was using cocoa#. But I had to move to monobjc because cocoa# remains
incomplete so far. And after moving to monobjc when I tried to load my app
using "mono appname.exe" the nib file would not load. So, please help me to
get NAnt compile unicode utf8 encoded source files.
-- 
View this message in context: http://www.nabble.com/How-to-specify-NAnt-to-use-UTF8-encoding-for-compiling-UTF8-encoded-source-files-%28c-%29--tp20895085p20895085.html
Sent from the Mono - OSX mailing list archive at Nabble.com.



More information about the Mono-osx mailing list