This alternative to displayName is more suitable to the charset attribute because it emits IANA-compatible MIME types or throws an error if the String encoding has no equivalent MIME type.
This is a purely additive change with no behavioral changes. Ideally the current uses of String.Encoding/displayName would be replaced with this new mimeName method in order to generate HTML attributes that are more correct.
This alternative to displayName is more suitable to the charset attribute because it emits IANA-compatible MIME types or throws an error if the String encoding has no equivalent MIME type.
This is a purely additive change with no behavioral changes. Ideally the current uses of String.Encoding/displayName would be replaced with this new mimeName method in order to generate HTML attributes that are more correct.
Related to https://github.com/scinfu/SwiftSoup/issues/279