Results 1 to 2 of 2

Thread: Entity Help

  1. #1
    Join Date
    May 2009
    Hampshire, UK

    Exclamation Entity Help

    I am really confused with a php function I have written. The function searches a string and replaces signs with their entities and the other way round. I know that the function works because it has been working for 4 months. However I am now constructing a new website and am using the same function. I know for certain there are no typing errors in the function and that it definately works. However when converting a '£' to it displays a �.

    The confusing part is that I have tested the old website on my server to make sure it works and it does but this new website does not. Maybe I am missing some sort of line of html to help encode these signs. I don't know if this makes a difference but at the moment the content-type is set to:

    HTML Code:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    This is what it is set on the old website so there should be no problem.

    Very grateful for any suggestions,

    Thanks in Advance,


  2. #2
    Join Date
    May 2009
    Hampshire, UK
    I resolved this by placing this code into the top of my page:

    PHP Code:
    header('Content-Type: text/html; charset=ISO-8859-1'); 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center