php - Apache keeps forcing non-UTF-8 character set -
i having character encoding problem web page works in local once uploaded remote server doesn't works properly.
i have simple textarea use update mysql database row utf-8 encoded text. pages html5 , use utf-8 encoding.
<!doctype html> <html> <head> <meta charset="utf-8"> ...
also database , tables encoded utf8 database charset , utf8_general_ci database collation.
when submit form , see updated textarea info database, see messed character. in local (but connecting same remote database), fine.
this textarea
<textarea class="form-control" name="info" required><?=htmlentities(getinfo($mysqli));?></textarea>
and function output result
function getinfo ($mysqli) { if ($result = $mysqli->query("select info settings limit 1")) { $row = $result->fetch_assoc(); $result->free(); } return $row["info"]; }
i have impression remote web server overriding charset informations somehow, tried adding .htaccess:
adddefaultcharset utf-8
but doesn't seem working.
what possible causes still cause text display this? how see in local, same code , same remote database.
in chrome developer tab, under network, seems response headers correct:
content-type:text/html; charset=utf-8
Comments
Post a Comment