Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Guest: content type and decoding #20

Open
radu-matei opened this issue Feb 27, 2021 · 0 comments
Open

Guest: content type and decoding #20

radu-matei opened this issue Feb 27, 2021 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@radu-matei
Copy link
Member

radu-matei commented Feb 27, 2021

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.

cc @technosophos

@radu-matei radu-matei added the help wanted Extra attention is needed label Feb 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant