Hi all..
In my app, i have a string say "Tony & Guy", i want to send it to the server through NSConnection....
I convert above string to NSData,and assigning it as HTTPBody...
But my server is throwing error as it parse "&" (the above string is a value for a node in an xml file)...
In java version, i converted the "&" to "%26" and POSTed it , working successfully..
Here also i tried with "%26" and "&"...Failed both times..
So on converting XMLstring to XMLData (NSData) using [myString -dataUsingStringEncoding:], which encoding i want to use???
I tried with NSUTF8Encoding and NSASCIIEncoding...
Still failed..
So my qstn is
tony %26 guy = [tony & guy stringUsingEncoding:????
Help....
In my app, i have a string say "Tony & Guy", i want to send it to the server through NSConnection....
I convert above string to NSData,and assigning it as HTTPBody...
But my server is throwing error as it parse "&" (the above string is a value for a node in an xml file)...
In java version, i converted the "&" to "%26" and POSTed it , working successfully..
Here also i tried with "%26" and "&"...Failed both times..
So on converting XMLstring to XMLData (NSData) using [myString -dataUsingStringEncoding:], which encoding i want to use???
I tried with NSUTF8Encoding and NSASCIIEncoding...
Still failed..
So my qstn is
tony %26 guy = [tony & guy stringUsingEncoding:????
Help....