MySQL Forums :: Newbie :: Encoding problem


Advanced Search

Encoding problem
Posted by: Thomas Zastrow ()
Date: August 04, 2010 01:49AM

Hello,

I created a table where in the MySQL Workbench the collation is set to "utf8 - default collation".

Now, I tried to fill up this table with "insert"-commands, created by a Java program and written to a file which is also encoded in UTF-8. On the commandline, I imported the stuff via

/mysql -u root -p MYDATABASE < import.sql

It seems to work, the table is filled up with the data. But when I take a look at the content of the table with the MySQl Workbench, all German "Umlauts" and other special characters are messed up. The same when I look at the data from within Netbeans.

Surprisingly, on the commandline everything works well and all characters are shown up perfectly...

Now, I dumped the database (on my developing machine) and restored it on the production server. There, again all special characters are gone, and now, also in the commandline they are screwed up ... at the moment, I'm absolutly not sure if my data is correctly imported or not ...?

So, am I doing something wrong? What is the best way to deal with UTF-8 data coming from Java, has to be imported into the database??

Thank you very much for any help.

Options: ReplyQuote


Subject Written By Posted
Encoding problem Thomas Zastrow 08/04/2010 01:49AM
Re: Encoding problem Rick James 08/05/2010 08:04AM
Re: Encoding problem Thomas Zastrow 08/05/2010 08:40AM
Re: Encoding problem Rick James 08/05/2010 09:05AM
Re: Encoding problem Shawn Taylor 08/05/2010 08:47AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.