Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 12502 [details]
Program showing encoding names
We've been testing our application for running on up-to-date Mono from the mono-project.com debian repositories.
When testing, we've found that the following code causes an exception on Mono 4.0.3 - this used to work on 3.4, and works on MS .NET:
Encoding asciiEncoding = Encoding.GetEncoding(Encoding.ASCII.EncodingName, new EncoderReplacementFallback(string.Empty), new DecoderExceptionFallback());
System.ArgumentException: 'Globalization.cp_20127' is not a supported encoding name.
Parameter name: name
at System.Globalization.EncodingTable.internalGetCodePageFromName (System.String name) [0x00000] in <filename unknown>:0
at System.Globalization.EncodingTable.GetCodePageFromName (System.String name) [0x00000] in <filename unknown>:0
at System.Text.Encoding.GetEncoding (System.String name, System.Text.EncoderFallback encoderFallback, System.Text.DecoderFallback decoderFallback) [0x00000] in <filename unknown>:0
The attached test program (a modified version of the program available at https://msdn.microsoft.com/en-us/library/system.text.encoding.codepage%28v=vs.110%29.aspx) shows all of the output for encoding names. I will also attach an example of the output on .NET 4.6 (Windows 10) vs Mono 4.0.3. There are quite a few differences in Encoding names.
Created attachment 12503 [details]
Output from the above test program when run on Mono 4.0.3
Created attachment 12504 [details]
Output from the above test program when run on Windows 10
Created attachment 12505 [details]
A diff showing the differences between the two test outputs
Created attachment 12506 [details]
A diff showing the differences between the two test outputs (now correct mime type)
Already fixed in master and Mono 4.2