Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 在xcode中更改URL中的HTML字符_Iphone_Url_Ios4_Character - Fatal编程技术网

Iphone 在xcode中更改URL中的HTML字符

Iphone 在xcode中更改URL中的HTML字符,iphone,url,ios4,character,Iphone,Url,Ios4,Character,给定如下URL: http%3A%2F%2Fwww.environment expert.com%2fResultTeachPressRelease.aspx%3Fcid%3D23745%26codi%3D234441%26lr%3D1 如何使用iphone sdk替换字符(如%3D等)以获得正常url 提前谢谢 试试看: NSString *myEscapedUrl = @"http%3A%2F%2Fwww.environmental-expert.com%2FresultEachPressR

给定如下URL:

http%3A%2F%2Fwww.environment expert.com%2fResultTeachPressRelease.aspx%3Fcid%3D23745%26codi%3D234441%26lr%3D1

如何使用iphone sdk替换字符(如%3D等)以获得正常url

提前谢谢

试试看:

NSString *myEscapedUrl = @"http%3A%2F%2Fwww.environmental-expert.com%2FresultEachPressRelease.aspx%3Fcid%3D23745%26codi%3D234441%26lr%3D1";

NSLog(@"my unescaped url: %@", [myEscapedUrl stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]);