This is a bad practice to use utf8_encode
, this adds a lot of complexity to your app. Try to solve the problem by looking for the source.
Ssome thoughts :
- a database server charset problem (check encoding of your server)
- a database client charset problem (check encoding of your connection)
- a database table charset problem (check encoding of your table)
- a php default encoding problem (check
default_encoding
parameter in parameters.ini) - a multibyte missconfigured (see mb_string parameters in parameters.ini)
- a
<form>
charset problem (check that it is sent as utf-8) - a
<html>
charset problem (where no enctype is set in your html file) - a
Content-encoding:
problem (where the wrong encoding is sent by Apache).