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

Android: createHttpClient cannot determine the charset encoding by html meta tag #2075

Merged
merged 0 commits into from
May 2, 2012
Merged

Conversation

kangaechu
Copy link
Contributor

@negupta
Copy link
Contributor

negupta commented Apr 27, 2012

Signed CLA is in place.

@joshthecoder
Copy link
Contributor

We may want to limit this check based on the content type.
Only search for the meta tag if the type is text/html.

Also for text/xml we should also search for the encoding.

String text = responseData.toString();
Pattern pattern = Pattern.compile("<meta[^>]*charset=\"*([\\p{Alnum}-.:_]+)\"*");
Matcher matcher = pattern.matcher(text);
if(matcher.find()){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need spaces around the parentheses. Ex: if (x > 1) { }

@kangaechu kangaechu merged commit 74d6a88 into tidev:master May 2, 2012
@kangaechu
Copy link
Contributor Author

During merge commitment operation, this request status changed "closed".
II am not familiar with the github operation, so I don't know how to recover this.
Would you tell me how to recover this?

@negupta
Copy link
Contributor

negupta commented May 3, 2012

@kangaechu - you should see a "Reopen" button towards the bottom of this page. You should be able to reopen a PR. If it does not work, open another PR where you can refer to the review comments in this PR.

@kangaechu
Copy link
Contributor Author

negupta:
Thanks for your helpful comment!

I make new pull request.
Please refer new pull request.
#2143

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.

3 participants