title: iOS5: UTF-8 encoding does not work at all
body: <p>My application is able to send the input of several textfields to a PHP script on my server using the POST function which sends the message to my email. The problem is, some characters won't get 'translated'. For example: ü -> Ã¼.</p>
  
  <p>I have already checked my HTTP Header but it's still UTF-8.</p>
  
  <p>I also use this code to convert the characters:</p>
  
  <pre><code>[textFieldName.text stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]
  
  NSData *postData = [post dataUsingEncoding:NSUTF8StringEncoding allowLossyConversation:YES];
  </code></pre>
  
  <p>What am I doing wrong? Even the PHP file has this code:</p>
  
  <pre><code>function mail_utf8($to,$subject = '(No subject)',$message = '',$header = ''){
      $header_ = 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/plain; charset=UTF-8' . "\r\n";
      if(mail($to, '=?UTF-8?B?'.base64_encode($subject).'?=', $message, $header_ . $header)) return true;
      else return false;
    }
  </code></pre>
  
  <p>EDIT:</p>
  
  <pre><code>NSString *post = nil;
              post = [[NSString alloc] initWithFormat:@"vorname=%@&amp;name=%@&amp;plz=%@&amp;ort=%@&amp;email=%@&amp;geburtsdatum=%@&amp;eventdatum=%@",
                      [textFieldVorname.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
                      [textFieldName.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
                      [textFieldPLZ.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
                      [textFieldOrt.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
                      [textFieldEmail.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
                      [textFieldGeburtsdatum.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
                      [textFieldEventdatum.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
              NSData *postData = [post dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES];
              NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];
              NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
              [request setURL:[NSURL URLWithString:@"http://www.url.com/document-send.php"]];
              [request setHTTPMethod:@"POST"];
              [request setValue: postLength forHTTPHeaderField:@"Content-Length"];
              [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
              [request setHTTPBody:postData];
              [NSURLConnection connectionWithRequest:request delegate:self];
  </code></pre>