NSURL *url = [NSURL URLWithString:
[urlpath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSURLRequest *request = [[ [NSURLRequest alloc] initWithURL:url
cachePolicy:NSURLRequestReloadIgnoringLocalCacheData
timeoutInterval:DL_DELAY] autorelease];
NSURLConnection *conn = [NSURLConnection connectionWithRequest:request delegate:self];
這就不怕中文名稱的網址或檔名了。
參考網址:
沒有留言:
張貼留言