index.php
<?php
include("header.php");
?>
header.php
<?php
echo"<a href='add.php'>Lägg Till</a>";
?>
result
L?gg Till
The document is utf8 within the head tags and all, it's a php thing, the problem only occurs when i get text from include, i cannot have ÅÄÖ in included php files , how do i make it work?
Save these files in utf-8 too
Besides saving the file in UTF-8 you could also check the "default_charset" configuration in the php.ini file.
when sending text to server with accents letters use always ut8_encode, in you case:
echo utf8_encode("<a href='add.php'>Lägg Till</a>");
I have the same problem and this on solves them.