kittysniper101
n00b
- Joined
- Jan 4, 2009
- Messages
- 22
Hello everyone.
I have recently begun writing my first application for the iphone (well actually the ipad) and am a little hung up on what seems a very small issue. I have to convert data to unicode to send via an NSOutputStream and when I use the built in NSString method for doing so and send the resulting object I am reading the escaped new line character (\n) in the string that is being sent.
If I remove the \n when I make the NSString it is no longer there but neither is the new line I need.
The relevant code is as follows.
thanks for everyone for looking and especially thanks to anyone who solves this.
I have recently begun writing my first application for the iphone (well actually the ipad) and am a little hung up on what seems a very small issue. I have to convert data to unicode to send via an NSOutputStream and when I use the built in NSString method for doing so and send the resulting object I am reading the escaped new line character (\n) in the string that is being sent.
If I remove the \n when I make the NSString it is no longer there but neither is the new line I need.
The relevant code is as follows.
Code:
sendData = [NSString stringWithFormat:@"itemset(\"Bar_01\", \"MAT_COLOR[2]\", %d)\n", b];
rawString =(const uint8_t *)[sendData UTF8String];
if ([ad.oStream write:rawString maxLength:[sendData length]] < 0) {
thanks for everyone for looking and especially thanks to anyone who solves this.