PDA

View Full Version : Problem with Apache and character encoding (?)


Eggbertx
14th October 2009, 01:55 AM
I am having a problem with my web server. On index.html, it should say "Welcome to my website! More coming soon!" but instead, in Firefox, if I go through my server by going to eggbertx.linium.net or localhost, it shows this:

��<�h�t�m�l�>� �<�h�e�a�d�>� � �<�t�i�t�l�e�>�E�g�g�b�e�r�t�'�s� �w�e�b� �s�i�t�e�<�/�t�i�t�l�e�>� �<�/�h�e�a�d�>� � �<�b�o�d�y�>� �W�e�l�c�o�m�e� �t�o� �m�y� �w�e�b�s�i�t�e�!� �M�o�r�e� �c�o�m�i�n�g� �s�o�o�n� �<�i�m�g� �s�r�c�=�"�m�s�f�r�e�e�.�p�n�g�"�>� �<�/�b�o�d�y�>� �<�/�h�t�m�l�>� ��� �

I know it isn't the file, because the file looks normal if I open it by going to /var/www/html/index.html

I looked at /etc/httpd/conf/httpd.conf and it says that it is using UTF-8, which I'm pretty sure is normal.

I don't remember it doing this before I installed kdewebdev and ran Quanta Plus, although I have no idea how it could have caused this. Has this happened to anyone else?

pete_1967
14th October 2009, 08:59 AM
What encoding you used when creating the page and what's encoding and character set set in the meta on the page?

markkuk
14th October 2009, 12:56 PM
I
I know it isn't the file, because the file looks normal if I open it by going to /var/www/html/index.html

Open it with what? Open a terminal (http://www.fedorafaq.org/basics/#terminal), dump the actual bytes in the file by "hexdump /var/www/html/index.html" and post the results.

Eggbertx
16th October 2009, 05:22 AM
It was the file, but normal text editors weren't viewing the characters. I opened it with the nano command and deleted the characters. Problem solved.

Baheri Instagram Photos - Ash Shatrah Photos - Elele Travel Photos