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

Forces encoding to utf-8 when fetching url titles [Resolves #648] #653

Merged
merged 2 commits into from
Apr 3, 2019

Conversation

briankung
Copy link
Contributor

@briankung briankung commented Mar 22, 2019

I found it moderately difficult to write a test case for this, since it seems like all the tests I wrote seemed to assume UTF-8 encoding and passed the \xe2\x80\x99 apostrophe through just fine. Regression test added.

Manual testing confirms that it works for the URL in #648 (https://www.codewithjason.com/sometimes-better-tests-hit-real-api/)

I can't locate Abdullah Samman, the last person to touch this line in 0e198cb, on GitHub, or I'd tag them as a reviewer.

Set to draft PR awaiting feedback on testing! I could spend a bit longer working on getting a test case written or we could just merge it.

@briankung briankung changed the title Forces encoding to utf-8 [Resolves #648] Forces encoding to utf-8 when fetching url titles [Resolves #648] Mar 25, 2019
@briankung briankung marked this pull request as ready for review March 25, 2019 18:54
@pushcx
Copy link
Member

pushcx commented Apr 3, 2019

Phew, what a corner case to run down, thanks for the deep dive and clear test.

(You know, if you like obscure encoding errors, #328 is a finely-aged sample of the genre...)

@pushcx pushcx merged commit d3c3c8e into lobsters:master Apr 3, 2019
@briankung briankung deleted the 648_fetch_title_fix branch April 3, 2019 12:58
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.

None yet

2 participants