A arme macrumors member Original poster Sep 15, 2008 48 0 Sep 24, 2008 #1 NSString *tmp = [[NSString alloc] initWithData:receivedData encoding:UTF8Char]; Error before encoding .
NSString *tmp = [[NSString alloc] initWithData:receivedData encoding:UTF8Char]; Error before encoding .
robbieduncan Moderator emeritus Jul 24, 2002 25,611 893 Harrogate Sep 24, 2008 #2 As we are not mind readers could you post the error? And anything else relevant?
A arme macrumors member Original poster Sep 15, 2008 48 0 Sep 24, 2008 #3 I receive a request from url. that is a string( OK or NOK) .it is save in NSSMUutableData . i need convert to NSString. have are you a idea?
I receive a request from url. that is a string( OK or NOK) .it is save in NSSMUutableData . i need convert to NSString. have are you a idea?
robbieduncan Moderator emeritus Jul 24, 2002 25,611 893 Harrogate Sep 24, 2008 #4 I know what you are trying to do. You've posted about it over and over and over and over and over and over and over and.... You say "Error before encoding". What is the error. Unless you are willing to post questions with enough detail you are not going to get answers.
I know what you are trying to do. You've posted about it over and over and over and over and over and over and over and.... You say "Error before encoding". What is the error. Unless you are willing to post questions with enough detail you are not going to get answers.
A arme macrumors member Original poster Sep 15, 2008 48 0 Sep 24, 2008 #5 error message is syntax error before encoding. and the remind of code is correct. please give me an idea that solve converting? thanks
error message is syntax error before encoding. and the remind of code is correct. please give me an idea that solve converting? thanks
robbieduncan Moderator emeritus Jul 24, 2002 25,611 893 Harrogate Sep 24, 2008 #6 arme said: error message is syntax error before encoding. Click to expand... Then you have typed something incorrectly somewhere. Not necessarily on that line: you may have forgotten a ; or a ] somewhere else. In my own code I'm using this (not sure why I chose this method over that one): Code: NSString *sourceSt = [[NSString alloc] initWithBytes:[downloadedData bytes] length:[downloadedData length] encoding:NSUTF8StringEncoding];
arme said: error message is syntax error before encoding. Click to expand... Then you have typed something incorrectly somewhere. Not necessarily on that line: you may have forgotten a ; or a ] somewhere else. In my own code I'm using this (not sure why I chose this method over that one): Code: NSString *sourceSt = [[NSString alloc] initWithBytes:[downloadedData bytes] length:[downloadedData length] encoding:NSUTF8StringEncoding];