Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Posts
    3

    Unanswered: ? is displayed on certain character/symbols

    Hi,

    I have just move to apache 2.0.48 and i have php 4.3.4, when i try to display the character or " or ' (and many others) they are replaced with the character '?'.

    I presumed this was a problem with php, but i tryed a simple html file and it also came up with the same problem.

    I have tryed:

    <?
    echo " this is a pound";
    ?>

    Its displays: this is a ? pound

    I have been told " apache 2.0 httpd.conf file comes with default charset being set to iso-8859-1 which is bad! that charset can't deal with many things" And to use utf-8 instead. I look at the config file and both charsets are in there. Should i remove the iso-8859-1 or is there another main problem?

    any help would be appreciated.

  2. #2
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: ? is displayed on certain character/symbols

    Originally posted by stevewhit
    Hi,

    I have just move to apache 2.0.48 and i have php 4.3.4, when i try to display the character or " or ' (and many others) they are replaced with the character '?'.

    I presumed this was a problem with php, but i tryed a simple html file and it also came up with the same problem.

    I have tryed:

    <?
    echo " this is a pound";
    ?>

    Its displays: this is a ? pound

    I have been told " apache 2.0 httpd.conf file comes with default charset being set to iso-8859-1 which is bad! that charset can't deal with many things" And to use utf-8 instead. I look at the config file and both charsets are in there. Should i remove the iso-8859-1 or is there another main problem?

    any help would be appreciated.
    Try to use following html code in you page (Replace XXXXX by encoding what you are using).
    <meta http-equiv="Content-Type" content="text/html; charset=XXXXX">

  3. #3
    Join Date
    Apr 2004
    Posts
    3
    <?
    header("Content-Type: text/html; charset=UTF-8");
    echo " this is a pound sign";
    ?>

    But it still displays: this is a ? pound sign

  4. #4
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482
    Originally posted by stevewhit
    <?
    header("Content-Type: text/html; charset=UTF-8");
    echo " this is a pound sign";
    ?>

    But it still displays: this is a ? pound sign
    Save the HTML code and post it here...

  5. #5
    Join Date
    Apr 2004
    Posts
    3
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    </head>
    <body>
    this is a pound sign
    </body>
    </html>

Posting Permissions

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