[Mono-list] Which IDE?

sasha trofimich at gmail.com
Wed Nov 21 18:43:11 EST 2007


> File a bug explaining that encoding 1251 fails to decode your source
> file that cannot be converted correctly to correct utf16 text, on bugzilla.

I've made some test on same computer with Mono 1.2.6 + XSP2 and .NET 2.0 
+ ASP.NET development server and found next:

1) If encoding explicitly specified then both .NET and Mono correctly 
decode my windows-1251 text file, for example this works fine:

Response.Write(File.ReadAllText(path, Encoding.GetEncoding("windows-1251"));


2) String builder has overloaded method without encoding parameter. This 
method attempts to automatically detect the encoding of a file based on 
the presence of byte order marks. Both Mono and .NET returns questions 
instead of national letters. Code is next:

Response.Write(File.ReadAllText(path)); // return ???????????????


3) Both Mono and .NET return correct Encoding.Default


4) I were added globalization attribute in Web.config, but it has no 
effect on both .NET and Mono. File is next:

<?xml version="1.0"?>
<configuration>
     <system.web>
         <globalization fileEncoding="windows-1251" />
         <compilation debug="true" />
         <authentication mode="Windows" />
     </system.web>
</configuration>

Taken from http://msdn2.microsoft.com/en-us/library/hy4kkhe0.aspx




So now i don't know what else i can to test. Why .NET recognize encoding 
and mono don't? Any opinions?



More information about the Mono-list mailing list