-
Notifications
You must be signed in to change notification settings - Fork 59
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
Encoding.name() vs. WHATWG encoding name #13
Comments
Regarding your examples, 1 is my mistake ( |
Other than "get an encoding form a label" and its quirks such as mapping latin1 to windows1252, I don’t think that "WHATWG-compatible" should be a different API for the actual decoding/encoding. Or is there a reason I’m missing that would prevent the APIs to be unified? |
@SimonSapin It is not a matter of the actual decoding/encoding, and these APIs won't be changed whatsoever. It is rather a matter of mapping the string label to the actual decoder/encoder, and in this respect WHATWG only considers Web browsers. So I think it is better to rename |
…_label. cherry picked from SimonSapin/rust-encoding@c4fdc3f.
whatwg::encoding_from_label
returns a tuple of anEncoding
object and the encoding name as a string, while the object also has a.name()
that returns the same as a string. This seems redundant.I would like to remove the former and only keep the latter, which should use names from the spec. The requires changes are:
shift-jis
toshift_jis
.iso-8859-8-i
, identical toiso-8859-8
but with a different name.windows-949
toeuc-kr
1 and 2 are harmless, but 3 seems to have been deliberate. Is there a difference between windows-949 and euc-kr, or a reason to prefer the first name?
The text was updated successfully, but these errors were encountered: