[Resolved] Spanish and german characters won't show in php file

Home Forums Support Spanish and german characters won't show in php file

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1033343
    eduard sans

    Hi there, I’m quite new to php and so far all the customized code I’ve done so far works. I’m basically using shortcodes for certain sections of the site that I want to be displayed on demand. The problem comes with the syntax since the site is in english, german and spanish. In both german and spanish, there are special characters that won’t show on the browser and I don’t know why. I checked around and apparently the php file must be coded in UTF-8 so I copied this line of code on top of my shortcode.php file but no change.

    header(“Content-Type: text/html;charset=utf-8”);

    I’ve asked on the support forum of my hosting (siteground) but they tell me it is not a problem of the server, so I don’t know if it would be somehow related to generatepress but I’m running out of options and I would like to know if there’s an easy solution to this.

    Thank you for your time!

    PS: I enclose a link where you can see where these characters are missing (scroll a little bit down to the “about the author” section and you’ll see strange characters among the text).

    #1033550
    Leo
    Staff
    Customer Support

    Hi there,

    This is unlikely a GP issue.

    Can you test this with a WordPress default twenty series themes and see if the issue exist there?

    Let me know 🙂

    #1033620
    eduard sans

    Hi there, yes, the issue is still there. I was just hoping if someone could shed some light on how to make php files fit the UTF-8 codification. I found this hint in stack overflow:

    “HTML page Content-Type should be set to UTF-8
    <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />”

    I have to put that line of code in the header of every html page, I understand that I should use an “element” in generatepress but I want to be sure. If you could assist me I’d be grateful.

    #1033624
    Leo
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.