Ok, this is actually a pretty interesting issue, and from comments with the OP, and viewing the file itself online; the issue is not with the server, or the HTTP headers which, correctly set as UTF-8.
HTTP HEADER
Content-Type: text/html; charset=UTF-8
HTML5 HEAD
<meta charset="UTF-8">
Looking at the source code of this file the issue appears more and more to be that the program used to write the file (NetBeans
) is not saving it with a correct UTF-8 file encoding.
Because the source file is NOT UTF-8, it means any references to HTTP headers or HTML5 Head tags stating to use UTF-8 will not work, because they're trying to convert milk to wine, which you can only do if you start with wine [or at least, grapes]!
So; with some research I've found to my surprise that (as of NetBeans 8.1 / windows 10) you can't set the character set of a code file, Netbeans can set the project character set, but that's a little tricky. There is a guide this this thread (See the answer by Danny) (and another here) about how to do this.
There is also a video guide to the above solution here.
Also see some NetBeans bug reports, some of which are 6 years old and a far from ideal situation... It appears NetBeans uses your OS default character encoding, such as usually Windows-1252 or similar. These can be less compatible with internet standard encodings (such as UTF-8), as I think you're finding here.
So I can only really say that if this was my choice, I would stop using NetBeans, and move over to something more reliable such as NotePad++.
You can open the offending file (varillas.php
) in another program (NotePad++) and check the characters displayed on the page are the correct ones (diámetro
rather than diámetro
) and then Save As a UTF-8 encoded file, then reupload the file and Hard refresh your browser (to clear the browser cache) and see if this fixes your issue.