Force encoding of blurbs download #26

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant

nmk commented Apr 5, 2012

In our case the JSON::parse heuristics were not correctly recognizing the encoding of the response body. The simplest way to remedy this is to explicitly mark the body as being in UTF-8.

A more robust approach would be to check the response's content-type header and extract the encoding from there. I would give this a try if the copycopter server is able to set the encoding to anything else than UTF-8. Otherwise I would just leave it hardcoded as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment