Hi,
I am trying to load a file with NSURLConnection but it always get messed, I tried a lot of NSStringEncoding types but none has worked.
I uploaded two examples that have an accentuation in <a>João</a> in my S3 bucket, please if someone manage to read it in iOS the right way: HELP ME.
These two only have the charset difference:
https://s3.amazonaws.com/cardcell/web.xml
https://s3.amazonaws.com/cardcell/web2.xml
This is the code on the delegate method:
This is the type of result I get:
I am trying to load a file with NSURLConnection but it always get messed, I tried a lot of NSStringEncoding types but none has worked.
I uploaded two examples that have an accentuation in <a>João</a> in my S3 bucket, please if someone manage to read it in iOS the right way: HELP ME.
These two only have the charset difference:
https://s3.amazonaws.com/cardcell/web.xml
https://s3.amazonaws.com/cardcell/web2.xml
This is the code on the delegate method:
Code:
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
// receivedData is an NSMutableData that appends all received data.
NSString *dataString = [[NSString alloc] initWithBytes: [receivedData bytes] length: [receivedData length] encoding: NSUTF8StringEncoding];
NSLog(@"dataReceived String: \"%s\"\n", dataString);
}
This is the type of result I get:
Data received: `ˇà