Echoing Language Characters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chunk1978
    New Member
    • Jan 2007
    • 224

    #1

    Echoing Language Characters

    hi there... can someone tell me how i can display my echo statement correctly? i'm using french characters but the output is crazy...

    my php code:

    Code:
    <?php
    echo "Montréal";
    ?>
    the result:

    Code:
    Montréal
    i really hope there's a simple fix to this...
  • NevadaSam
    New Member
    • May 2006
    • 3

    #2
    replace the "é" with "&eacute;"

    echo "Montr&eacute;" ;

    It will print out the way you want it then.

    Sam

    Comment

    • chunk1978
      New Member
      • Jan 2007
      • 224

      #3
      Originally posted by NevadaSam
      replace the "é" with "&eacute;"

      echo "Montr&eacute;" ;

      It will print out the way you want it then.

      Sam
      hi sam thanks for the response... i figured this out earlier though and forgot to repost... i just encoded my HTML and PHP script outputs with charset=UTF-8... so i can write "Montréal" and not have to write "Montr&eacute;" , or worry about all the other special french characters ;-)...

      horay for unicode text encoding!!! :-p

      Comment

      • NevadaSam
        New Member
        • May 2006
        • 3

        #4
        Glad you got it going.

        Sam
        ;

        Comment

        Working...