Page 1 of 1

Help with mysql and foreign characters

Posted: Sat Jan 09, 2010 7:44 am
by tehhparadox
Hi guys

I am making something that involves putting and getting korean characters into a mysql database and I came across a problem. When you insert some korean characters, they all change into some strange symbols like '����'. I thought it might be fine once I get and display it on a html page, but it turned into some other strange symbols and you can't read them whatsoever.
I changed the Collation in my tables to different character sets including utf-8_unicode_ci, euckr_bin and euckr_korean_ci, but that didn't help either. What do I have to do to make my database allow foreigh character sets to be transferred safely?

Re: Help with mysql and foreign characters

Posted: Sat Jan 09, 2010 7:51 am
by Apollo
tehhparadox wrote:What do I have to do to make my database allow foreigh character sets to be transferred safely?
Use the same encoding everywhere (i.e. on your database collations and connection, and in your html header), and make sure that the text you're putting your DB is actually encoded that way.

Re: Help with mysql and foreign characters

Posted: Sat Jan 09, 2010 8:26 am
by tehhparadox
Even if I change encoding in Firefox (View->Encoding) none of them work..

Re: Help with mysql and foreign characters

Posted: Sat Jan 09, 2010 10:07 am
by Apollo
Randomly changing codepages here and there won't solve the problem. Really, if you follow the rule I mentioned above, it will work. Always.