title: iOS Bad URL for NSUrlConnection
body: <p>I have a url in an NSString called myUrl.  When I NSLog myUrl I see the following:</p>
  
  <pre><code>http://dl.dropbox.com/u/57665723%2FChocolatesRUs%2FJellies%2FUn-sugared%2Fgen%20no%20sugar.pdf
  </code></pre>
  
  <p>I then try connecting using this url as follows:</p>
  
  <pre><code>NSURL* url = [ NSURL URLWithString:nextFileURL ];
  NSMutableURLRequest* request =  [ [ NSMutableURLRequest alloc ] initWithURL: url ];
  NSURLConnection* conn = [ [ NSURLConnection alloc ] initWithRequest: request delegate: self ];
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <pre><code>errorcode=-1000, error=Error Domain=NSURLErrorDomain Code=-1000 "bad URL" UserInfo=0x27e540 {NSUnderlyingError=0x26d800 "bad URL", NSLocalizedDescription=bad URL}
  </code></pre>
  
  <p>I have tried using </p>
  
  <pre><code>NSString* myUrl = [myUrl stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
  </code></pre>
  
  <p>but this doesn't work either.</p>
  
  <p>Can anyone see the problem?</p>