0

Problem: I use a index.php wich includes other php files.

index.php declares:

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

All ok until here with portuguese characters "é,ç,ã".

When I include php files, chars are wrong encoded. With the use of utf8_encode() in the php file being included, things work fine. But, this is to much work encode every sing piece of text in several php files. So, I'm looking for a global solution.

I already tried: 1- use (as the first thing in the index.php file), nothing changes.

header('Content-Type: text/html; charset=utf-8',true);

2- use (as the first thing in the index.php file), in this case the include files work fine but index.php are wrong enconded now.

header('Content-Type: text/html; charset=iso8859-1',true);

3- insert the lines of code above everywhere in index.php and in beinginclued.php files, nothing changes.

Any help will be wellcome.

sgm
  • 196
  • 3
  • 14

0 Answers0