title: iOS special characters in url
body: <p>I try to make an api call:</p>
  
  <pre><code>api.app.com/foo/search/Öhm
  </code></pre>
  
  <p>where Öhm is the search term. The problem is that this url causes a bad url exception, while normal chars work well. I tried with</p>
  
  <pre><code>[searchText stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]
  </code></pre>
  
  <p>However this produces a lot of % signs. The api expects Öhm. Any solution for this problem? I am using restkit.</p>
  
  <p>The full error:</p>
  
  <blockquote>
    <p>Error Domain=NSURLErrorDomain Code=-1000 "bad URL" UserInfo=0x16e719d0
    {NSUnderlyingError=0x16d70d10 "bad URL", NSLocalizedDescription=bad
    URL} 2014-04-03 18:26:55.404 My App[6844:3807] E
    restkit.network:RKObjectRequestOperation.m:243 GET '(null)' (0 / 0
    objects) [request=0.0084s mapping=0.0000s total=0.0769s]: Error
    Domain=NSURLErrorDomain Code=-1000 "bad URL" UserInfo=0x16e719d0
    {NSUnderlyingError=0x16d70d10 "bad URL", NSLocalizedDescription=bad
    URL}</p>
  </blockquote>
  
  <p>The termin is (null) instead of Öhm.</p>
  
  <p>Code:</p>
  
  <pre><code>[[ApiSearchManager sharedManager] search:^(NSArray *result){
      //handle success
  } failure:^(RKObjectRequestOperation *operation, NSError *error) {
      //handle fail - it fails for Öhm
  } query:searchTerm];
  </code></pre>
  
  <p>and on the lower level:</p>
  
  <pre><code>- (void) search:(void (^)(NSArray *))success failure:(void (^)(RKObjectRequestOperation *, NSError *))failure query:(NSString *)query{
  
      [self getObjectsAtPath:[NSString stringWithFormat:@"foo/search/%@", query] parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
          if (success) {
              success(mappingResult.array);
          }
      } failure:^(RKObjectRequestOperation *operation, NSError *error) {
          if (failure) {
              failure(operation, error);
          }
      }];
  }
  </code></pre>