PHP & Android - UTF-8 encoding problems -


we're doing post request via android php , android passing utf-8 string, our database cp1252 (has live iphone backend, hence working it)

however can't seem string converted cp1252. tried following code without results

$userkey = utf8_decode($userkey); $userkey = iconv('utf-8', 'cp1252', $userkey); $userkey = mb_convert_encoding($userkey, 'cp1252', 'utf-8'); 

check response

echo 'userkey: '.mb_detect_encoding($userkey); 

always returns utf-8

further more if $userkey sent value "no" , following

if($userkey == "no"){   echo "not registered" }else{   echo "registered find db record" } 

the code seems drop else - great :)


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -