• Hi there,
    I am working on a blog which contains posts in Japanese. Coll, everything works fine, no problem with WordPress. However I have another page outside of the blog that lists the latest blog titles. The ecoding for this page is set to
    <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />

    I am retrieving the blog titles like this:

    <?php echo $row_photography[‘post_title’]; ?>

    This works fine, except the titles in Japanese are displaying ‘?????’

    What do I need to do to display the Japanese text correctly? How does WordPress display Japanese text correctly?

    Thanks in advance.
    Simon

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter loquela

    (@loquela)

    Hi Samboll,
    Thanks for your response. I’m not actually having problems writing and displaying Japanese in WordPress, that all works fine. What I’m trying to figure out is how WordPress actually manages to display Japanese text in the browser:

    I have wp 2.6.3 and my db table collocation is already set to utf8_unicode_ci all the Japanese text in the database is displaying perfectly. The problem is when I connect to the db from outsite wp and try to display the results, I get the ????? output. Again, the page encoding is
    <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />

    I am display my query results with <?php echo $row_photography[‘post_title’]; ?> so I presume I need to do something with the print statement? How does WordPress do it?

    Thread Starter loquela

    (@loquela)

    Does anybody know how WordPress displays Japanese characters in the browser?

    Thread Starter loquela

    (@loquela)

    The site I am working on is here:
    A) https://chonanclegg.co.uk/photography – this the WordPress installation and everything works fine.

    B)https://chonanclegg.co.uk – contains the index.php that I am struggling with. The encoding is correct and this page has no problems displaying Japanese text normally. The h1 is hard-coded into the page and displays perfectly. However the text that is brought in from the WordPress db above displays as ???

    Both sites are on the same server, both query the same database, both have the same document encoding. can anybody figure out what I am doing wrong that WordPress is dong right?

    May thanks,

    Simon

    Thread Starter loquela

    (@loquela)

    Thanks. I sorted it. I need to SET NAMES.

    All works now.

    loquela – I’m curious how you managed to get japanese to display in general :s i’m using utf-8 encoding on my website, but japanese won’t display at all. it’s coming up as ??? in my browser. I have east asian languages installed, and can view japanese just fine on other websites. For some reason it just doesn’t want to display for me.

    Hi loquela, I am having the same problem as Mordof. I have a site in english and need to display some titles and words in japanese, the won’t show up… Please could you teach us how to solve this? Thanks

    Mordof and ShirouJune, here is my thread I started, with a solution to your problem about having Japanese show up when you type.

    https://www.ads-software.com/support/topic/285010?replies=4

    The specific information you wanted is this:

    Update. I know can type Japanese into my site, however, I’m still struggling to find an answer to the interface front/back end problems. To solve the problem about being able to display Japanese, I found the following information:

    I followed this advice: https://www.japanitup.com/wordpress-japanese-english/

    and changed all the Collation from latin1_swedish_ci to utf8_unicode_ci

    Here is the breakdown japanitup.com gave:

    If this doesn’t make sense to you then I’ll give you a step by step break down.

    1. Back up your database. Not sure how? Check out this wordpress database plugin called WP-DBManager.
    2. Log into your phpMyAdmin
    3. Choose your database on the left
    4. Under your database on the left, click on wp_comments
    5. On the right you’ll see Field, Type, Collation, Attributes, etc.
    6. For the Fields that have Collation set as something other than utf8_unicode_ci you should tick the check box.
    7. After you ticked all check boxes in that table, click the pencil icon at the bottom. When you mouse over it there should be a tool tip that says “change”. When you click this you can edit those fields.
    8. Using the drop down box on each field you can now change the Collation from whatever it is (example latin1_swedish_ci) to the bottom selection in the drop down box which is utf8_unicode_ci.
    9. Hit Save
    10. Now click on the next table on the left hand side which should be called wp_links.
    11. Repeat these steps for each table.

    I went on to go down the list, through all the tables and where ever it had latin1_swedish_ci, I changed it to utf8_unicode_ci.

    I’m still hoping someone can provide me with more information on my original question.

    loquela — how do you set names? I have the same issue with no japanese showing up since upgrading to 2.8.4 and can’t figure it out – -what’s the code you used?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Displaying Japanese chracters’ is closed to new replies.