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:

<h2>Administración</h2>

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?

Answers


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.


Need Your Help

How to protect a global variable shared by isr and regular function?

c assembly arm mutex semaphore

Let's say I have function 1 and an isr routine, both share and update the same flag without any lock between them. the system is single threaded.

docker daemon logs are missing

logging docker boot2docker dockerfile

I am looking for the docker-daemon logs, the ones that display information between the docker client and the docker daemon.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.