Use encoding from the response when getting remote data (bug 1012817)

https://bugzilla.mozilla.org/show_bug.cgi?id=1012817