PHP include with characters problem

2

I'm using include in two files.

One file usually includes, however, the other one comes with problems in the characters, the " " character appears in the accents.

But by opening the two files in notepad++ , they are normal, with accents and everything else.

Does anyone know how to solve it?

    
asked by anonymous 18.05.2015 / 20:41

2 answers

2

Put in the COLLATE database utf8_unicode_ci

In the database connection script you put this

header('Content-Type: text/html; charset=utf-8');
mysql_query("SET NAMES 'utf8'");
mysql_query('SET character_set_connection=utf8');
mysql_query('SET character_set_client=utf8');
mysql_query('SET character_set_results=utf8');

And on the page arrows the CHARSET you're at

<meta http-equiv="content-type" content="text/html;charset=utf-8" />

If none of this works

echo utf8_encode(  );
    
18.05.2015 / 21:44
1

Open the files in notepad ++ and go to the format menu button and select the option: UTF-8 encoding (without BOM), note that during this process there may be a character change in the .php file (eg changing the letter t to or other strange character) then you should change this strange character by the correct character.

    
19.05.2015 / 16:00