Results 1 to 7 of 7
  1. #1
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,420
    Thanks
    33
    Thanked 195 Times in 175 Posts

    Unexpected characters showing on webpage

    A friend of mine is getting characters like © instead of in his web-hosted pages but not on his local PC. I suspect this is likely to be a missing character set specification - can someone suggest what needs to be inserted and where? (He is using a CMS called Website Baker, if that assists...)

    Thanks!
    BATcher

    Time prevents everything happening all at once...

  2. #2
    2 Star Lounger
    Join Date
    Aug 2004
    Location
    Withyham, Sussex, England
    Posts
    121
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Unexpected characters showing on webpage

    I think these are called BOM characters and usually are associated with UTF 8 character sets, Google bom and you should find an answer.

  3. #3
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,420
    Thanks
    33
    Thanked 195 Times in 175 Posts

    Re: Unexpected characters showing on webpage

    You may well be right, but reading the Wikipedia article on Byte-Order Mark doesn't get me very much further! I'm hoping for an HTML statement which will cause no trouble on the PC on which the website is created, but will solve the problem when the pages get uploaded to the host.
    BATcher

    Time prevents everything happening all at once...

  4. #4
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Unexpected characters showing on webpage

    You could ask your friend if they have defined the character set required for the page. If they haven't got it already try adding this meta tag in the head tags. It is normally best placed directly after the opening <head> tag

    <pre><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    </pre>

    Jerry

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Unexpected characters showing on webpage

    Try viewing the page in Firefox, right-clicking and checking View Page Info. This should indicate the character encoding being used. Is it different between the local copy and the server? The server might be sending one that is incompatible with the format in which the file was saved. For example, people sometimes save in UTF-16 with certain editors. If there is an option, UTF-8 might be best.

  6. #6
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,420
    Thanks
    33
    Thanked 195 Times in 175 Posts

    Re: Unexpected characters showing on webpage

    Thanks, Jerry and Jefferson, for your pointers.

    I did look at the source before, honest! The web page as I see it contains no charset HTML line, so putting one in might assist. But View -> Page Source -> View -> Character Encoding indicates Western (ISO-8859-1), so it looks my friend may have editor problems. (I hesitate to suggest that he may be using a Mac...!)
    BATcher

    Time prevents everything happening all at once...

  7. #7
    Star Lounger
    Join Date
    Feb 2003
    Location
    DC Metro, District Of Columbia, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Unexpected characters showing on webpage

    (Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>)

    I realize I am way late, but I just read this post. So,,,,,
    From W3schools --->Character Entities
    Some characters have a special meaning in HTML, like the less than sign (<) that defines the start of an HTML tag. If we want the browser to actually display these characters we must insert character entities in the HTML source.
    A character entity has three parts: an ampersand (&), an entity name or a # and an entity number, and finally a semicolon (.
    To display a less than sign in an HTML document we must write: < or <
    The advantage of using a name instead of a number is that a name is easier to remember. The disadvantage is that not all browsers support the newest entity names, while the support for entity numbers is very good in almost all browsers.

    Note that the entities are case sensitive.

    Sometimes I use a named entity like (* (added the space between p and semicolon for display on this page)* lots of times to format the display or get a super/subscript. Here is the link for W3schools. This is one of my bibles I use and have used for years, even though I buy lots of books.

    http://www.w3schools.com/HTML/html_entities.asp

    Luck,
    JL

Posting Permissions

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