Limada Posted May 4, 2011 Share Posted May 4, 2011 Hello everybody, Hope somebody can help. As the subject says, I'm having encoding problems in my includes files, the "accents" and some special characters don't work. However, they do work in my main HTML. I really don't know what the problem is and how to fix it. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/235475-encoding-problem-in-the-includes-files/ Share on other sites More sharing options...
efficacious Posted May 4, 2011 Share Posted May 4, 2011 could you show us an example... Quote Link to comment https://forums.phpfreaks.com/topic/235475-encoding-problem-in-the-includes-files/#findComment-1210207 Share on other sites More sharing options...
Limada Posted May 4, 2011 Author Share Posted May 4, 2011 Hi. Unfortunately, I had installed Ubuntu again, lost all my work =D and I don't have an example. Lost almost everything but I'll try to explain it briefly and not including all the code. I have the header, footer and the main_nav in a folder called Includes, I use PHP in my main HTML document wich looks like this: <?php include "includes/header.inc"; ?> <?php include "includes/main_nav.inc";?> <!DOCTYPE html> <html> <head> <title>Encoding problem</title> <meta charset= UTF-8> </head> <body> <h1>WHATEVER</h1> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque egestas, sapien eu blandit bibendum, elit velit sollicitudin nisl, at adipiscing lectus</p> <?php include= "includes/footer.inc";?> </body> </html> Everything all right but, for example, in my main_nav, the accents (or tildes) don' t work and it shows an "?" instead of the correct word. I think It's an encoding problem and I don't know why the UTF-8 works in my main: <body><h1></h1><p></p></body> but it doesn't in the files ".inc" =(. Hope you can help me and thank you for replying. Quote Link to comment https://forums.phpfreaks.com/topic/235475-encoding-problem-in-the-includes-files/#findComment-1210218 Share on other sites More sharing options...
Pikachu2000 Posted May 4, 2011 Share Posted May 4, 2011 It's hard to diagnose an actual problem without actual code, actually . . . Quote Link to comment https://forums.phpfreaks.com/topic/235475-encoding-problem-in-the-includes-files/#findComment-1210225 Share on other sites More sharing options...
efficacious Posted May 4, 2011 Share Posted May 4, 2011 ^^ but try replacing the ~ character with ˜ Quote Link to comment https://forums.phpfreaks.com/topic/235475-encoding-problem-in-the-includes-files/#findComment-1210227 Share on other sites More sharing options...
Limada Posted May 4, 2011 Author Share Posted May 4, 2011 Well, I did that already. It's just annoying! I know it's hard to help me like this but I have to do it all again so, when it's ready, I'll attach some of this. Just trying to learn. (It's not hard to see that I'm a beginner ) Thanks for your kindness. Rocío. Quote Link to comment https://forums.phpfreaks.com/topic/235475-encoding-problem-in-the-includes-files/#findComment-1210229 Share on other sites More sharing options...
Limada Posted May 4, 2011 Author Share Posted May 4, 2011 Bye the way, I don't use too much HTML5 right now because I understand that not every tag is supported as well. Or I have bad info Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/235475-encoding-problem-in-the-includes-files/#findComment-1210234 Share on other sites More sharing options...
Limada Posted May 4, 2011 Author Share Posted May 4, 2011 It's hard to diagnose an actual problem without actual code, actually . . . Hi! As I said, I try to do not use HTML5 too much. Did you refer to it or another thing? Every opinion is welcome. Quote Link to comment https://forums.phpfreaks.com/topic/235475-encoding-problem-in-the-includes-files/#findComment-1210244 Share on other sites More sharing options...
Pikachu2000 Posted May 4, 2011 Share Posted May 4, 2011 What I mean is that you asked for us to try to help you solve a problem based on "example" code. That is almost impossible. Quote Link to comment https://forums.phpfreaks.com/topic/235475-encoding-problem-in-the-includes-files/#findComment-1210246 Share on other sites More sharing options...
Limada Posted May 4, 2011 Author Share Posted May 4, 2011 What I mean is that you asked for us to try to help you solve a problem based on "example" code. That is almost impossible. Oh, ok. And how will be the possible way to ask for you to help me? I've never wrote in a forum, your answer will be apreciatted. Quote Link to comment https://forums.phpfreaks.com/topic/235475-encoding-problem-in-the-includes-files/#findComment-1210248 Share on other sites More sharing options...
Pikachu2000 Posted May 4, 2011 Share Posted May 4, 2011 You will need to post the actual code that is causing the problem.Use copy/paste to post it here. Quote Link to comment https://forums.phpfreaks.com/topic/235475-encoding-problem-in-the-includes-files/#findComment-1210251 Share on other sites More sharing options...
Limada Posted May 4, 2011 Author Share Posted May 4, 2011 You will need to post the actual code that is causing the problem.Use copy/paste to post it here. Ok. I will do that as soon as I write it again. Thanks for your kindness. Quote Link to comment https://forums.phpfreaks.com/topic/235475-encoding-problem-in-the-includes-files/#findComment-1210253 Share on other sites More sharing options...
Limada Posted May 4, 2011 Author Share Posted May 4, 2011 You will need to post the actual code that is causing the problem.Use copy/paste to post it here. Oh, ok. I'll do that as soon as I writte it again. Thanks again for your kindness. Quote Link to comment https://forums.phpfreaks.com/topic/235475-encoding-problem-in-the-includes-files/#findComment-1210256 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.