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
Closed

get character encoding from content-type #47

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

Comments

@lawremi
Copy link
Contributor

@lawremi 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

@jimhester jimhester 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...

Loading

@lawremi
Copy link
Contributor Author

@lawremi lawremi commented Jan 28, 2016

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

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants