Encoding PHP MySQL -


i can see query results see � character characters "Á".

basic connection this:

$mysqli = new mysqli(server, user, pass, db); mysqli_set_charset($mysqli, 'utf8'); 

i tried with:

$mysqli->query("set names 'utf8'"); $mysqli->set_charset("utf8"); mysql_query("set names 'utf8'"); 

but characters still watching.

query

function connection($mysqli) {      mysql_query("set names 'utf8'");      if ( ! $link = mysqli_connect("localhost", "user", "pass") ) {         echo ("error");         return false;     }     if ( ! mysqli_select_db($link, "db") ) {         echo ("error");         return false;     }     if ( ! $consulta = mysqli_query($link, $mysqli) ) {         echo ("error");         return false;     }     return $consulta; } 

all files saved utf8, var columns in db utt8 too.

what or problem?

thank you!

maybe php file saved ansi doc, try utf8 without bom. try declare charset utf8 on output file.

hope help


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -