Bug 32137

Summary: System.Text.Encoding.UTF8.EncodingName not the returning human-readable description of the current encoding
Product: [Mono] Class Libraries Reporter: Adam Hartley [MSFT] <adam.hartley>
Component: mscorlibAssignee: Marek Safar <masafa>
Status: RESOLVED FIXED    
Severity: normal CC: brendan.zagaeski, chrisntr, gcnew, masafa, mono-bugs+mono
Priority: ---    
Version: 4.0.0   
Target Milestone: Untriaged   
Hardware: Macintosh   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: Sample

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]
Sample
Comment 3 gcnew 2015-07-20 07:24:44 UTC
The following encodings also return unreadable description:
Encoding.ASCII,
Encoding.BigEndianUnicode,
Encoding.Unicode,
Encoding.UTF32,
Encoding.UTF7
Comment 4 Marek Safar 2015-07-21 08:44:57 UTC
Fixed in master and Mono 4.2