• I can’t write Swedish letters (?,?,?) in the default template. It works to write the letters in a post, but I have to use the letters in the template files and I can’t use letter codes (because I can’t change the text).

    Is there a way to make this possible?

Viewing 15 replies - 1 through 15 (of 19 total)
  • What do you mean you cannot change the text?
    Just open the file on your computer in a plain text editor (like Notepad) and make ALL the changes you want.
    Then click “Save As” and make sure in the dialog box you select the proper encoding = utf-8.
    It should work.

    Thread Starter johanlundin88

    (@johanlundin88)

    I can’t change the texts because I don’t have access to the them, they are picked out from a database with a script in the template file.

    Which theme? What text? Link?

    Thread Starter johanlundin88

    (@johanlundin88)

    I have customized the default theme. https://various.vegetarian.at/

    they are picked out from a database with a script in the template file

    You mean you are “re-posting” RSS feeds from other sites… or what?

    In that case the original site and your site MUST have the same character encoding.

    Thread Starter johanlundin88

    (@johanlundin88)

    Actually the database with the texts is on my own server, but other people write the texts and that’s why I can’t in a simple way change the letters.

    Other sites on my server do have Swedish character encoding, but not this WordPress template. I can’t understand why it doesn’t and how I can change it.

    but other people write the texts
    How? THAT matters… if the input to that database is not happening with utf-8 – it will never work.

    Do your other sites have the same input thing by others?

    Thread Starter johanlundin88

    (@johanlundin88)

    The script works at my other sites on the same server. I can pick out the same texts from the same database.

    Thread Starter johanlundin88

    (@johanlundin88)

    I think it’s something with my database being set to ISO-8859-1 and WordPress UTF-8. The text from the databse works if I change to ISO-8859-1 in Firefox.

    How do I change my database table to UTF-8?

    How do I change my database table to UTF-8?

    That’s not that simple: it would mess up a lot of things; e.g. then it would display wrong characters on ALL the other sites where it is OK now…

    Thread Starter johanlundin88

    (@johanlundin88)

    Ok, but let’s try.

    Thread Starter johanlundin88

    (@johanlundin88)

    All WordPress tables and rows are set to latin1_swedish_ci (same as the tables to this script) what’s the difference between the tables? Or is it something I should change in the script to make it work with UTF-8?

    That’s why I didn’t want you to mess with the database. Encoding and collation are two different things and you have to understand very well how they work before doing anything.
    There were some posts about changing the encoding – it’s a long and painful process. Try to search for it!

    Sorry, I am not an expert in this matter, so I don’t feel comfortable giving advice that might destroy your site ??

    Thread Starter johanlundin88

    (@johanlundin88)

    I don’t get why it should be a long process to change the character encoding in one table with Phpmyadmin, and I couldn’t find anything about how to do it.

    I tried this in SQL, but it didn’t seam to work:
    ALTER TABLE kopochsalj DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci

    Does anyone else know how to do this?

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Swedish letters in template’ is closed to new replies.