I have a .php
file saved as UTF-8
and I would like to let it print out a character like €
How can I do it?
This is the source code of the example:
<?php
header('Content-Type: text/html; charset=UTF-8');
echo "€";
?>
The file was saved with notepad++
as UTF-8
but when I execute the file it just prints me out "?"
Answer
While the answer provided here UTF-8 all the way through fullfills various aspect of UTF-8, i found the answer to my question inside Matthew comment.
The .php file was saved as UTF-8 but WITH BOM. Within Notepad++ i choosed Format-> "UTF-8 without BOM" and the script worked.