This isn't a complete answer but it may point you in the right direction...
I had some experience of using localized text (most of the popular
languages) in a database a couple of years ago. That was using Oracle but
the lessons are the same.

Initially Oracle was not UTF-8 enabled. Alot of text could be stored using
the latin character set. We'd use the \uXXXX notation or something similar
for the special characters. Eventually we had Oracle UTF-8 enabled so we
could just load in the special characters (such as Japanese and Chinese)
from a UTF-8 text document. Note, I used the TextPad 4.5 program. It's
SaveAs option enables you to save files using UTF-8 encoding.

I'm no MySQL expert, but the different lanaguage setting in MySQL seem to
mainly apply to its error messages. To my knowledge, MySQL does not yet
offer full UTF-8 support so you might have to store the special characters
using the \uXXXX notation or something similar. You might need a utility
program to generate the text file codes easily. Someone in our office wrote
one in Java.

Skim through the following which I found after a quick search on google...

http://darkstar.ist.utl.pt/mysql/doc/en/Charset-Unicode.html

http://ldp.kernelnotes.de/HOWTO/Unicode-HOWTO.html

http://www.cogsci.ed.ac.uk/~richard/unicode-sample.html

www.unicode.org

It's an excellent question. One that's on my todo list to work out fully!



----- Original Message -----
From: "Vikram Vaswani" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 04, 2003 5:48 PM
Subject: Using a foreign character set in MYSQL


> Hello all.
>
> I am working with MySQL 4.0. I have a requirement to create a data-driven
> Web page to display Chinese text from a MySQL table. I'm completely new to
> this, can someone tell me exactly what I need to do to make this happen?
>
> 1. For example, how do I insert the Chinese text from my source (a Word
> doc) into a MySQL table without corrupting it? When I try copying and
> pasting it into the mysql client command-line, the data gets trashed.
>
> 2. Once it's in, how do I get it back out into my application without
> corrupting it? I'm using PHP 4.3 for the Web site.
>
> 3. If I need to make changes to the data from the command-line client, how
> can I do it, especially if the query involves using a Chinese-language
> string? For example, "update langdata set
> menutitle='SOME_MENU_TITLE_IN_CHINESE' where
> menutitle='SOME_OLD_MENU_TITLE_IN_CHINESE'"
>
> Looked at the online manual but am sorry to say it didn't really help
much.
> I tried starting the server with --character-set=big5 but it didn't seem
to
> make much difference...
>
> Thanks!
>
> Vikram
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.506 / Virus Database: 303 - Release Date: 01/08/2003


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to