i really have the trouble w/ coverting japanese into utf-8

i wanna transfer an accese table(some japanese data) in to a mysql table. i somehow always get something like ? when i view my mysql table. so my question is how i can convert the japanese chars to UTF-8 or is there any other better way?please help
[262 byte] By [bigdadismea] at [2007-10-2 14:26:20]
# 1
I work with Japanese all the time, but you are going to have to be a lot more specific before I can help you.Drake
Drake_Duna at 2007-7-13 12:46:17 > top of Java-index,Desktop,I18N...
# 2

okay, here is my situation. im currently working for a japanese company who asked me to migration part of their data from access(.mdb) to mysql. everything worked out for me except when i opened the mysql table, it had some ? data instead showing the japanese characters correctly. i set my mysql table to support UTF-8 and my question is how i convert the japanese characters(i dont know which unicode i should pick for the japanese either. Shift-JIS?) to UTF-8 correctly

bigdadismea at 2007-7-13 12:46:17 > top of Java-index,Desktop,I18N...
# 3

First you have to identify the problem, which is usually one of two things:

1) Lack of font support

2) An encoding error

Since you are getting question marks and not a string of random nonsense, I am going to guess that the problem here is not encoding, but fonts. But I have no idea what software you are using to do any of this, on what platform, with what support.

Drake

Drake_Duna at 2007-7-13 12:46:17 > top of Java-index,Desktop,I18N...
# 4
i use JAVA to do this oviousely. i try to use jdbc-mysql and jdbc-odbc to migrate the data directly.yes, i dont know how to encoding. i do have the fonts support.
bigdadismea at 2007-7-13 12:46:17 > top of Java-index,Desktop,I18N...
# 5

I have never worked with RMDBs, encoding, and Java in unison so sadly I do not really know how encoding is handled in that world. I only use it with files, where InputStreamReader and OutputStreamWriter, properly instantiated with the right character set, solve all my problems. There must be a similar solution in your case.

I.e. before you start trying to get all clever with byte arrays and doing math on their contents, see if there aren't some stream classes that can do this for you. I would be very surprised if there were not.

Drake

Drake_Duna at 2007-7-13 12:46:17 > top of Java-index,Desktop,I18N...
# 6
umm... would you like to share some ur ideas first? maybe i can base on what u give to me to figure out!
bigdadismea at 2007-7-13 12:46:17 > top of Java-index,Desktop,I18N...
# 7
Where is the data coming from and going to? Is the Microsoft stuff a file sitting on your hard drive? Is the SQL server a remote one over which you have no control, or one you are running on your end?Drake
Drake_Duna at 2007-7-13 12:46:17 > top of Java-index,Desktop,I18N...
# 8
the original access data and the target mysql database are on the same machine and i have full control to both.
bigdadismea at 2007-7-13 12:46:17 > top of Java-index,Desktop,I18N...
# 9
Why don't you start by getting the data from the original database, and writing it to file using an OutputStreamWriter. That way we can see whether the data you are getting is correct. If it is not, we know the problem is on that side. If it is, we know it is on the other
Drake_Duna at 2007-7-13 12:46:17 > top of Java-index,Desktop,I18N...
# 10
The other thing I would do is send a hard-coded Japanese string to the SQL database and see if you can view it.If you can't, you know the problem is on that end.:DDrake
Drake_Duna at 2007-7-13 12:46:17 > top of Java-index,Desktop,I18N...
# 11
hehe, good! i guess i cant!!!!u remind me the song "the end of the load" hehe
bigdadismea at 2007-7-13 12:46:17 > top of Java-index,Desktop,I18N...