Problem with "è" in content.php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kalibukbuk
    New Member
    • Jun 2007
    • 3

    #1

    Problem with "è" in content.php

    I have a problem with the è in a content.php page.

    The è is shown as " è ".

    however, in a body.php the "è" is shown as it is.

    Where does it go wrong?

    p.s. i am a bit new to php.

    Thanx in advance
  • jx2
    New Member
    • Feb 2007
    • 228

    #2
    Originally posted by Kalibukbuk
    I have a problem with the è in a content.php page.

    The è is shown as " è ".

    however, in a body.php the "è" is shown as it is.

    Where does it go wrong?

    p.s. i am a bit new to php.

    Thanx in advance
    how did you save the file? it seems to be a text encoding problem
    u could save it as different encoding or if you see that in a results server could think thats not encoding u want to:-)

    u might try to enforse encoding (example for UTF-8):

    header('Content-Type: text/html; charset=utf-8');
    u need to use it at the very begining of the script

    i hope it helps

    Comment

    • Kalibukbuk
      New Member
      • Jun 2007
      • 3

      #3
      Originally posted by jx2
      how did you save the file? it seems to be a text encoding problem
      u could save it as different encoding or if you see that in a results server could think thats not encoding u want to:-)

      u might try to enforse encoding (example for UTF-8):

      header('Content-Type: text/html; charset=utf-8');
      u need to use it at the very begining of the script

      i hope it helps


      it is already saved in utf-8. but thanx for posting....

      Comment

      • ronnil
        Recognized Expert New Member
        • Jun 2007
        • 134

        #4
        Have you tried to ascii or HTML encode it?

        & #232; (without the space) or è should do the trick. (hopefully)

        When using special characters like that it's always best to encode them :)

        If that doesn't work, htmlspecialchar s() or htmlentities() should be able to peform the operation (but not quite sure how since i rarely work with those kind of characters)

        Check out http://www.asciitable.com or http://www.lookuptables.com, a good resource

        Comment

        • Kalibukbuk
          New Member
          • Jun 2007
          • 3

          #5
          Originally posted by ronnil
          Have you tried to ascii or HTML encode it?

          & #232; (without the space) or è should do the trick. (hopefully)

          When using special characters like that it's always best to encode them :)

          If that doesn't work, htmlspecialchar s() or htmlentities() should be able to peform the operation (but not quite sure how since i rarely work with those kind of characters)

          Check out http://www.asciitable.com or http://www.lookuptables.com, a good resource
          Thanx Ronnil!!!

          This works!! Thanx for your post!

          Comment

          Working...