Forum Moderators: open

Message Too Old, No Replies

Integrating Korean into a MySQL database

I know this is OT in this forum, but can anyone help?

         

louponne

10:26 pm on Nov 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a network of European-language sites that are all displaying data from a centralized database. Now, I need to add a Korean-language site to the network.

As I understand it, I'd need to "translate" the MySQL database into unicode for it to support Korean characters.

If I convert the database into Unicode, as I understand it, I then have to change the charset on all my dynamically generated html pages to display it correctly in browsers?

But then don't only very recent browsers support Unicode?

ps: I already asked this over on the php forum, but didn't get much response - I'm thinking that over here in Asia, there are probably more people familiar with this question!?

Woz

10:35 pm on Nov 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have not done any bi-lingual sites louponne so I am not much specific use with your question. However, a few years ago I constructed an Access database using both Chinese and English. To get it to work I had to do the database on a PC with Chinese Windows and Chinese Office. If I built it on English OS/Office then it would not support the Chinese entries. This would tend to support your premise.

Hopefully others more knowledgeable in this area might be able to help further.

Onya
Woz

bill

12:57 am on Nov 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



As late as last year I have heard from programmers in Japan and China saying that Unicode was not a good database solution for those languages yet. I am not as familiar with the Korean language situation, but assume that you'd be in the same boat.

You are correct that you would have to change the charset on your pages, but don't forget to also add the language attribute to the code as well. If you add the following two elements to each page you should cover most of the browsers:

<html lang="kr"> 
...
<meta http-equiv="Content-Language" content="kr">

tedster was mentioning in another recent thread that you can declare the content-language (and character set) in the HTTP server header: How to declare content language [webmasterworld.com]
That might be an option depending on your server setup.

whats up skip

2:57 am on Nov 25, 2004 (gmt 0)

10+ Year Member



First things first.

Are you storing Korean data in the MySQL data base?

If you are you must import this data using the correct character set. I recommend using Myphpadmin, select Korean and the correct character set.

Then you need to check to make sure the data is showing correctly in MyphpAdmin. Then you can go on to extract the data into the web pages.

louponne

7:17 am on Nov 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As late as last year I have heard from programmers in Japan and China saying that Unicode was not a good database solution for those languages yet.

um, well what is the alternative?

You are correct that you would have to change the charset on your pages, but don't forget to...

Yes I realize that - I've already created static Japanese-language pages. The problem here is that I must have, in the same database, European and Korean language data. And then I must display data from that mysql db, on web pages.

Again, I know that I can do that, using a unicode mysql database - the question is, when I go to display that information on web-pages, whether that is going to resrict the browsers that can view them, on my European-language sites.

bill

8:24 am on Nov 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



um, well what is the alternative?
Well, like whats up skip suggested, use a local charset like x-sjis or EUC-JP for Japanese instead of the UTF-8. The language you upload in is key. If it looks good once you get it on the webserver (MyphpAdmin) you're ok to go.

whether that is going to resrict the browsers that can view them, on my European-language sites.
Sounds like a CMS of some sort. Is there any way to have different charsets on the templates? That might help.

If you can get the Korean content up and looking correct with UTF-8, then technically your European content shouldn't be affected at all. You just need to set the correct language tags on the different pages.

Unicode is great when it works. I know that Google Japan and Korea are using it. I just wanted to warn you that some local people still aren't all that convinced it is the best encoding for their languages. They have sited some display problems on different browsers and web enabled devices as their reason for this argument. I haven't quizzed them more deeply for the technical details.

louponne

9:56 am on Nov 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ok, I'm missing something here, undoubtedly out of ignorance

Well, like whats up skip suggested, use a local charset like x-sjis or EUC-JP for Japanese instead of the UTF-8. The language you upload in is key. If it looks good once you get it on the webserver (MyphpAdmin) you're ok to go.

Well, phpMyAdmin is just a php interface that accesses the MySQL database. As I understand it, if we want to store "exotic" characters in MySQL, we must install the db itself as a unicode database.

Unicode is great when it works. ... They have cited some display problems on different browsers

That's precisely what I'm worried about - hm, ...

whats up skip

10:15 am on Nov 25, 2004 (gmt 0)

10+ Year Member



We run Japanese language (shift JIS and EUC) data bases on standard English language hosting companies.

What you need myphpAdmin (or similar) for; is the importing of the data (say from a text file) to a MySQL data base.

ONLY by selecting Korean or Japanese language interface are you given the corresponding encoding options. These options do not show in English interface.

I never had any sucess using the MySQL ODBC connectors from MS Access to mySQL when using Japanese data. The only other tool I have found that worked well is the Navicat product, but you need the 6.1 beta or later version for full support of Japanese encoding from MS Access.