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

get character encoding from content-type #47

Closed
lawremi opened this issue Jan 27, 2016 · 2 comments

Comments

@lawremi
Copy link
Contributor

commented Jan 27, 2016

After decoding the message payload, gmailr could extract the charset from the Content-Type header. By default on the web, this is iso-8859-1, which R calls "latin1". That could be set on the string, e.g.,

Encoding(x) <- "latin1"

But then again, I'm not sure where that actually helps, since R always displays and writes strings in the current locale, so things get weird.

@jimhester

This comment has been minimized.

Copy link
Member

commented Jan 28, 2016

I am definitely not an expert on how character encodings work in R. However setting the encoding based on Content-Type seems to me like something httr should handle if it provides a benefit...

@lawremi

This comment has been minimized.

Copy link
Contributor Author

commented Jan 28, 2016

Not sure what httr could do in this case, since you have to decode the base64 stuff first.

@jimhester jimhester added the feature label Aug 13, 2019

@jimhester jimhester closed this in d4010e9 Aug 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.