Why php includes doesn´t processes accents right?
As explained here (http://stackoverflow.com/questions/2867771/php-include-and-accents-they-show-up-as) php has a strange behavior processing the accents. My question is Why?
I mean: I have a simple utf-8 charset page. With this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>My Title</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> </head> <body> <?php include ('file.php');?>
The included file just says: "Administración." It has no charset, just header tags (h2, h3...), and some links. Like this:
So, there is no charset conflict. Are not they supposed that the include files are just included?
The previous question was answered with some fix to the problem, but my question is Why PHP behaves this way?
to answer you new questions (from your comment):
How can I do the same thing in other editors, how do I know the default charset?
default-charset and charset for every single file can be set in almost every code-editor i know - where exactly depends on the editor. simply take a look into the manual/documentation of your editor for that.