leowebdav icon indicating copy to clipboard operation
leowebdav copied to clipboard

Problem with encoded URLS

Open annamf opened this issue 10 years ago • 0 comments

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.

annamf avatar Nov 19 '14 12:11 annamf