Jump to content

utf-8 encoding breaks with template files


jodunno

Recommended Posts

Hello, i am trying to build a website with German language. I save all of my php pages as utf-8 without BOM. If i hard code every page, i have no problems. However, all of my pages are the same except for content between header and footer. I made a template header, individual content files and a template footer (all php files).

index.php include "header.php"; include "pagecontent.php"; include "footer.php";

when i do this, i look at my pages and everything seems fine. However,  my German characters become jumbled letters if i use the back button in the web browser to view the previous page. why is this happening? can i fix it?

Link to comment
Share on other sites

yes and no. I use Windows 10 and when i view the code in Notepad it  is okay. The word is Uebersicht and the U is U with umlaut. When i inspect element, the word is jumbled in the source code of Microsoft Edge. Notepad++ also shows this jumbled text only after this problem occurs in the Edge browser. This is strange! it's like Edge is altering the encoding of my source file and it is reflected in Notepad++

i save as utf-8 without BOM because i get a giant space at the top of my divs in each template. I am so frustrated. I sometimes want to quit/ I don't understand why this is happening. Firefox doesn't do it but if a user has edge? is this an edge bug?

Link to comment
Share on other sites

oh, Lord! the error is all my fault. I left a meta tag in my document that specifies iso-8859-1. I'm sorry for wasting forum space and your time. I am so burnt out. I've been working on this site for three years now. Sometimes 16 hours in a day. Lately i cannot deal with problems. I think that i need to get away now. I wanted this site done by May but i'm not sure about this date. I need to relax. Maybe drink a beer.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.