jodunno Posted March 22, 2019 Share Posted March 22, 2019 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? Quote Link to comment https://forums.phpfreaks.com/topic/308503-utf-8-encoding-breaks-with-template-files/ Share on other sites More sharing options...
requinix Posted March 22, 2019 Share Posted March 22, 2019 If you View Source the page, do the characters appear properly? Quote Link to comment https://forums.phpfreaks.com/topic/308503-utf-8-encoding-breaks-with-template-files/#findComment-1565516 Share on other sites More sharing options...
jodunno Posted March 22, 2019 Author Share Posted March 22, 2019 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? Quote Link to comment https://forums.phpfreaks.com/topic/308503-utf-8-encoding-breaks-with-template-files/#findComment-1565517 Share on other sites More sharing options...
jodunno Posted March 22, 2019 Author Share Posted March 22, 2019 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. Quote Link to comment https://forums.phpfreaks.com/topic/308503-utf-8-encoding-breaks-with-template-files/#findComment-1565518 Share on other sites More sharing options...
requinix Posted March 22, 2019 Share Posted March 22, 2019 12 minutes ago, jodunno said: I'm sorry for wasting forum space and your time. No problem. Free SEO content ? 1 Quote Link to comment https://forums.phpfreaks.com/topic/308503-utf-8-encoding-breaks-with-template-files/#findComment-1565519 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.