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

Skip to content

Set default charset to UTF-8 in AsyncHttpResponseHandler #57

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

Merged
merged 1 commit into from
May 29, 2012

Conversation

avram
Copy link
Contributor

@avram avram commented May 29, 2012

EntityUtils.toString(entity) defaults to ISO-8859-1, which is pretty inconvenient and rarely desired in modern APIs commonly encountered by Android apps. This pull request changes the default to UTF-8, which strikes me as a more common case. If deemed appropriate, I can rework this to keep the current default encoding and make it easier to override (maintaining reverse-compatibility), but this is a more sensible default.

Cf. http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/util/EntityUtils.html#toString(org.apache.http.HttpEntity)

loopj added a commit that referenced this pull request May 29, 2012
Set default charset to UTF-8 in AsyncHttpResponseHandler
@loopj loopj merged commit baca1fc into android-async-http:master May 29, 2012
@loopj
Copy link
Collaborator

loopj commented May 29, 2012

Thanks @AJLyon

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

Successfully merging this pull request may close these issues.

2 participants