Skip to main content
Known Participant
December 8, 2009
Question

Confused about encoding...korean characters

  • December 8, 2009
  • 2 replies
  • 1011 views

Hi,

I'm building a site which will mainly be for Korean users (using PHP and MySQL) .  I've built the site in English (as i planned to translate it before launch) but im having trouble getting the korean characters to display on the site.  I am able to read Korean characters from other pages okay but from my site i just get question marks.  I have chaged the collation (i think thats the right word) in the MYSQL database to use korean characters and it accepts it okay (i can see the Korean words in the database) but PHP wont echo any Korean words, only questions marks.  I've been reading a book about encoding but im totally confused.  Im using utf-8 but i've also tried euc-kr (i think thats the one - im not on my home computer) and still no luck...

What am i doing wrong?

Im using Dreamweaver CS4 and Windows 7

Thanks for any help

Ben.

This topic has been closed for replies.

2 replies

Known Participant
December 9, 2009

Hi,

I have enabled mbstring in PHP ini but im still getting the same problem of only seeing question marks where there should be Korean characters.  In the mysql database I have tried encoding the database and table as UTF-8_unicode_ci as well as euckr_korean_ci but i still get the same problem.  The browser can display Korean characters as i have read them on different sites etc.  The browser is set to encode <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> again, i've tried this with other charsets but sill get the same answer.

When i insert Korean characters into the database it shows them as Korean characters so theres a problem with sending them to PHP and displaying them there.  If i do a simple echo with php (without connecting to the database) php displays the Korean characters correctly....im so confused.

Can anyone help?

Thanks for looking..

Ben.

David_Powers
Inspiring
December 8, 2009

I have built a static website in Korean, and it worked just fine with euc-kr encoding.

However, I have extensive experience with Japanese in MySQL and PHP. The first thing to check is that mbstring is enabled. Without mbstring enabled in the PHP configuration, you'll get nowhere fast with Asian characters in PHP.

Known Participant
December 8, 2009

Thanks David,

I will check that when i get home tonight.

On a side note it was your books Php Solution and The Essential Guide to Dreamweaver CS3 With CSS, Ajax and PHP that got me into php...great books!

Thanks,

Ben.