leowebdav
leowebdav copied to clipboard
Problem with encoded URLS
Hello,
I'm using your library (very good job) but I have problems with Spanish characters like ó, ò, á, à, etc.
If you want to solve this problem for other people the changes are:
LEOWebDAVParser.m :
if ([elementName isEqualToString:@"href"]) { // _currentItem.href = [_currentString stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; _currentItem.href = [_currentString stringByReplacingPercentEscapesUsingEncoding:NSASCIIStringEncoding]; //good line }
and
`NSString *encodedString = (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(nil, (CFStringRef)item.href, NULL, (CFStringRef)@"óòéèáíàú",kCFStringEncodingISOLatin1));
LEOWebDAVPropertyRequest *request=[[LEOWebDAVPropertyRequest alloc] initWithPath:encodedString];
[request setDelegate:self];
[client enqueueRequest:request];``
I put this comment here because I don't know where is the correct site.