RestKit/RestKit — pull request #547 by aeolian (2012-02-05 23:59:23+00:00)
Title: RestKit could potentially fail to handle non UTF-8 content when HTTP headers are not provided

Hi,
I'm using RestKit for personal developments and came around a possible problem.
Nothing critical, but in hypothetical cases, RestKit could be unable to parse body content.

The story is the following:
- Have a web resource that has not HTTP headers for its content type (a basic Apache server for instance).
- The resource content is not UTF-8 encoded (US-ASCII, Windows Latin, just name it)

Then the default encoding (NSUTF8StringEncoding) is hard-coded and will be applied.

My pull request is about to giving a chance to the developer to set this default encoding whenever he knows about it.

The change looks backward compatible.
Unit test is barely testing the default encoding against a website that I know is delivering no HTTP headers for the content type and retrieves resources (HTML pages) with Windows Latin encoding.