Pages

Sunday, December 30, 2012

Xcode updating MySQL through phpScript in foreign languages

I've a code in xcode which runs a web link to execute phpScripts.

 

================================================================================ ====

NSString *strURL = [NSString stringWithFormat:@"http://www.???.com/1.php?customerid=??"];

// to execute php code
NSData *dataURL = [NSData dataWithContentsOfURL:[NSURL URLWithString:strURL]];

// to receive the returend value
NSString *strResult = [[NSString alloc] initWithData:dataURL encoding:NSUTF8StringEncoding];

================================================================================ ====

 

 

The problem with this is, when I try to input a foreign language as the variable 'customerid', the script will not be executed. Only English will be understood and executed, every other languages with foreign characters will not be executed.

Please advise.



View the original article here

0 comments:

Post a Comment