We are posting some messages from the website and displaying it on a mobile app. We are storing messages in base 64 encoded formats in mysql database. For mobile apps, we are giving base 64 encoded strings, and mobile developers are decoding it and displaying normal text. Now the problem is that when we enter ', single quote, double quote 'Then this character resembles' \ n, \' and \ "."
Is there any solution for this Android and iPhone app? Will display correctly in or will we do it from the PHP server side
You need to use NSDataBase64EncodingEndLineWithLineFeed
instead of code> NSDataBase64Encoding64CharacterLineLength parameter in iOS while converting to normal string base 64 using base64EncodedStringWithOptions
method
NSString * strNormalText = [yourBase64Data base64EncodedStringWithOptions: NSDataBase64EncodingEndLineWithLineFeed]; < / Code>
Try these parameters below if necessary:
NSDataBase64Encoding76CharacterLineLength NSDataBase64EncodingEndLineWithCarriageReturn
Comments
Post a Comment