we are posting some message from website and displaying it on the mobile app. We are storing the message in base64 encoded format in mysql database. For mobile app we are giving the base64 encoded string, and mobile developer are doing decoding from there side and displaying the normal text. Now issue is when we are using 'enter, single quote, double quote' this characters are displayed as ' , \' and \" ' like this.
Is there any solution for this that this will displayed correctly in the android and iphone app. or what we can do this from php server side.
You need to use NSDataBase64EncodingEndLineWithLineFeed
instead of NSDataBase64Encoding64CharacterLineLength
parameter in iOS while converting base64 into normal string using base64EncodedStringWithOptions
method
NSString *strNormalText = [yourBase64Data base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];
Try these below parameters if needed :
NSDataBase64Encoding76CharacterLineLength
NSDataBase64EncodingEndLineWithCarriageReturn