filou
filou

Reputation: 1619

Xcode/iOS5: How to set UTF-8 into a POST function for correct encoding?

I'd like to encode my message correctly. When I post my data via PHP to my email, some characters look wrong (in german ü, ö, ä look like u, o, a). How do I correctly encode my message in UTF-8?

Upvotes: 0

Views: 1539

Answers (1)

Christian Schnorr
Christian Schnorr

Reputation: 10786

Am I right if I assume that you want to send an NSString to a server?
Try using NSString's -stringByAddingPercentEscapesUsingEncoding: before generating the URL.

Upvotes: 2

Related Questions