Jump to content

Encoding problem in the includes' files.


Limada

Recommended Posts

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.

Link to comment
Share on other sites

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.

 

 

 

 

 

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

:)

Link to comment
Share on other sites

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.  :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.