0

Simple thing I'm doing is connecting to retrieving user's name from Facebook and passing it to a web site as a parameter in the form of:

http://website.com?name=

However ios's UIWebView fails being able to load the url if the name has special characters used commonly in foreign names: Such as this one fb link

I retrieve the title, keep it in an NSString and pass it and append it to the URL.

What do you think can be the cause and how can I possibly fix it? I am fine with the name appearing incorrectly or with special characters encoded with numbers but it just fails.

Anyone came across this?

Thanks!

4

1 回答 1

0

You can try encoding URL encoding the parameter. Just google for "ios encode url", ir this link http://madebymany.com/blog/url-encoding-an-nsstring-on-ios

于 2012-06-12T00:08:24.037 回答