hypothesis / h

Annotate with anyone, anywhere.
https://hypothes.is/
BSD 2-Clause "Simplified" License
2.96k stars 427 forks source link

Typographer quotes causing problems in API calls from Python #3590

Closed kshaffer closed 8 years ago

kshaffer commented 8 years ago

Steps to reproduce

  1. Make an API call from Python for an annotation/highlighted passage that contains typographer quotes.

    Expected behaviour

Typographer quotes should come through as unicode character.

Actual behaviour

In Python 3, they are unrecognized characters.

Browser/system information

Python 3, using requests and json modules.

Additional details

Using ast module fixes the issue: https://github.com/kshaffer/pypothesis/pull/1. But since this doesn't happen in PHP (http://pushpullfork.com/uncategorized/testing-the-skeleton-of-a-hypothesis-aggregator-plugin-for-wordpress/) it might be an issue with my Python code? I've wrestled with unicode and utf-8 a lot in Python, but do not claim to be an expert.

robertknight commented 8 years ago

@kshaffer - Could you provide a Gist of the code that you are trying to run, including the actual URL of an annotation that is causing problems for you?

robertknight commented 8 years ago

I'm going to close this issue for the moment as we need more details in order to confirm there is a problem.