Saturday 15 February 2014

php - Base64 encoded message issue with webservice for mobile app -



php - Base64 encoded message issue with webservice for mobile app -

we posting message website , displaying on mobile app. storing message in base64 encoded format in mysql database. mobile app giving base64 encoded string, , mobile developer doing decoding there side , displaying normal text. issue when using 'enter, single quote, double quote' characters displayed ' \n, \' , \" ' this.

is there solution this displayed correctly in android , iphone app. or can php server side.

you need utilize nsdatabase64encodingendlinewithlinefeed instead of nsdatabase64encoding64characterlinelength parameter in ios while converting base64 normal string using base64encodedstringwithoptions method

nsstring *strnormaltext = [yourbase64data base64encodedstringwithoptions:nsdatabase64encodingendlinewithlinefeed];

try these below parameters if needed :

nsdatabase64encoding76characterlinelength nsdatabase64encodingendlinewithcarriagereturn note : in android same alternative might available

php android ios mysql mobile-application

No comments:

Post a Comment