Smarty turning apostrophes/punctuation into weird characters

Discussion in 'PHP' started by crazyryan, Jul 28, 2008.

  1. #1
    Hey

    Smarty is turning apostrophes and quotation marks into weird characters like these:

    ’ and “

    How can I fix that?
     
    crazyryan, Jul 28, 2008 IP
  2. wmtips

    wmtips Well-Known Member

    Messages:
    601
    Likes Received:
    70
    Best Answers:
    1
    Trophy Points:
    150
    #2
    I think this is not a Smarty fault, but an encoding problem. Try to change your browser encoding and see how it looks. It seems your template is unicode, but page displayed in the different encoding.
     
    wmtips, Jul 28, 2008 IP
  3. crazyryan

    crazyryan Well-Known Member

    Messages:
    3,087
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    175
    #3
    What do I change the page encoding to?
     
    crazyryan, Jul 28, 2008 IP
  4. wmtips

    wmtips Well-Known Member

    Messages:
    601
    Likes Received:
    70
    Best Answers:
    1
    Trophy Points:
    150
    #4
    Depends of encoding of your templates. Maybe utf-8?
     
    wmtips, Jul 28, 2008 IP
  5. crazyryan

    crazyryan Well-Known Member

    Messages:
    3,087
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    175
    #5
    Oh, how do I found out what encoding they're using?
     
    crazyryan, Jul 28, 2008 IP
  6. wmtips

    wmtips Well-Known Member

    Messages:
    601
    Likes Received:
    70
    Best Answers:
    1
    Trophy Points:
    150
    #6
    I've already said one of the methods:
    If everything displayed correctly switched to utf-8, then this is utf-8.

    You edit your template files, so you have to know encoding of the files created by the editor you use.
     
    wmtips, Jul 28, 2008 IP