RestKit/RestKit — Issue #413: Feature request: set RKResponse encoding.
Author: theFm
Created: 2011-10-18 07:37:25+00:00
State: open

See code at RestKit / Code / Network / RKResponse.m
- (NSString*)bodyAsString {
return [[[NSString alloc] initWithData:self.body encoding:NSUTF8StringEncoding] autorelease];
}
I was working on i18n but failed. the main reason is about encoding.

We should not assume that encoding is UTF8, because when we parse a xml, it maybe use other encoding (kCFStringEncodingISOLatin1,kCFStringEncodingGB_18030_2000...).

we'd better add a encoder to RKLoader? so that user can set the response.