Thanks to visit codestin.com
Credit goes to github.com

Skip to content

get character encoding from content-type #47

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

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

get character encoding from content-type #47

lawremi opened this issue Jan 27, 2016 · 2 comments
Labels
feature a feature request or enhancement

Comments

@lawremi
Copy link
Contributor

lawremi 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
Copy link
Member

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
Copy link
Contributor Author

lawremi 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 a feature request or enhancement label Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants