我有一些URL中的一些「特殊」字符在它像引號。 當我試試這個:NSURL是null或一個混亂的字符串
NSURL *url = [NSURL URLWithString:@"http://someurl/%22sometext%22"];
url爲空。
當我嘗試這樣:
NSURL *url = [NSURL URLWithString:[@"http://someurl/%22sometext%22" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
我geht這樣一種可怕的輸出:
{類型= 15,串= http://someurl/%22sometext%22,編碼= 134217984,鹼=(空)}
有人可以幫我嗎?
什麼在第一URL的問題?它的工作很好。 – Hector 2012-03-02 10:56:57