Edit AllPages

How can I encode an General/NSString in the correct form to send it as an argument in an HTTP POST operation?

The following Core Foundation function works just fine:

for example:

General/NSString *myMessage = @”Some Text With+Some&Characters+that would get lost”; General/NSString *legalCharactersThatIWantEncodedAnyway = @”+&”; General/NSString *encodedMessage = General/CFURLCreateStringByAddingPercentEscapes (0, myMessage, 0, legalCharactersThatIWantEncodedAnyway, kCFStringEncodingUTF8);

Or use General/NSString’s stringByAddingPercentEscapesUsingEncoding: method (10.3 or later).