encoding - Why is PHP's utf8_encode breaking my utf-8 string? -
i'm doing kind of roundabout experiment thing i'm pulling data tables in remote page turn ics can find out when sports team playing (because can't find anywhere information more readily available in table), that's give context.
i pull data using curl , parse using domdocument
. take , parse info need. what's giving me trouble opposing team. when display data on initial php page, it's correct. when write ics file, special utf-8 characters messed up. thought utf8_encode
solve problem, seems have opposite effect: when run function on data, stuff displayed on page (which had been displaying correctly), not in separate ics file (which writing incorrectly), incorrect. example: turns "inđija" "inÄija."
any tips or resources far dealing utf-8 strings in php? server (a remote host) doesn't have mbstring
installed either, pain.
utf8_encode encodes string in iso 8859-1 utf-8. if put utf-8 it, it's going interpret if iso 8859-1, , hence produce mojibake.
to first problem, before this, i'd want know sort of "special" characters being messed in original problem, , way being messed up?
Comments
Post a Comment