Bug 32137 - System.Text.Encoding.UTF8.EncodingName not the returning human-readable description of the current encoding
Summary: System.Text.Encoding.UTF8.EncodingName not the returning human-readable descr...
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: 4.0.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
Depends on:
Reported: 2015-07-20 06:37 UTC by Adam Hartley [MSFT]
Modified: 2015-07-21 08:44 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Sample (68.03 KB, application/zip)
2015-07-20 06:45 UTC, Adam Hartley [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description Adam Hartley [MSFT] 2015-07-20 06:37:06 UTC
## Overview

When calling System.Text.Encoding.UTF8.EncodingName, the resulting string is not the human-readable description of the encoding.

## Steps to reproduce

1. Download attached sample.
2. Run either the Android or iOS sample and tap the button.
3. Observe the displayed title for the button.

## Expected result

"Unicode (UTF-8)" should be returned.

## Actual result

"Globalization.cp_65001" is displayed.

## Notes

Included in the zip is a simple C# console app which you can run on Windows and see the expected result

When run with Mono on OS X you will see the erroneous result.
Comment 2 Adam Hartley [MSFT] 2015-07-20 06:45:44 UTC
Created attachment 12109 [details]
Comment 3 gcnew 2015-07-20 07:24:44 UTC
The following encodings also return unreadable description:
Comment 4 Marek Safar 2015-07-21 08:44:57 UTC
Fixed in master and Mono 4.2