You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
Some webpages return different text encodings ("content-type": "text/html; charset=ISO-8859-1"), such as ISO-8859-1 - and because the response we return in the library is an uninterpreted byte array, users will have to manually read the content type response header and appropriately decode the body. This is counter-intuitive, as most HTTP libraries will automatically do this.
It would be very helpful if we could provide users with a simple way of automatically decoding the response text based on the content type.
I am not really sure what would be the best way to handle this, but it looks like encoding_rs would be a very good place to start.
Some webpages return different text encodings (
"content-type": "text/html; charset=ISO-8859-1"
), such asISO-8859-1
- and because the response we return in the library is an uninterpreted byte array, users will have to manually read the content type response header and appropriately decode the body. This is counter-intuitive, as most HTTP libraries will automatically do this.It would be very helpful if we could provide users with a simple way of automatically decoding the response text based on the content type.
I am not really sure what would be the best way to handle this, but it looks like
encoding_rs
would be a very good place to start.cc @technosophos
The text was updated successfully, but these errors were encountered: