Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mimeName to String.Encoding. #281

Merged
merged 1 commit into from
Aug 15, 2024
Merged

Add mimeName to String.Encoding. #281

merged 1 commit into from
Aug 15, 2024

Conversation

jverkoey
Copy link
Contributor

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 #279

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 scinfu#279
@aehlke
Copy link
Collaborator

aehlke commented Aug 15, 2024

LGTM

Please add a test for this if you can in the future (not sure what is good to test here though, as I'm unfamiliar with this use case)

@aehlke aehlke merged commit 0af3194 into scinfu:master Aug 15, 2024
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants