You do need to configure MySQL to use UTF-8 for your tables. Its default is Latin-1 which is not suitable for Greek. And you do need to make your JSPs use UTF-8 as the response encoding as well. And when you are trying to find out why you don't see Greek characters correctly, don't try testing both MySQL and JSP at the same time. Test them separately.
I don't know. I would look it up in the MySQL documentation for you, but it's on my home computer and I'm at work. There's a whole section about encodings and collations. You will find it in the MySQL "docs" directory (I think) on your computer.
Joined: Dec 15, 2005
Originally posted by Paul Clapham: I don't know. I would look it up in the MySQL documentation for you, but it's on my home computer and I'm at work. There's a whole section about encodings and collations. You will find it in the MySQL "docs" directory (I think) on your computer.
Originally posted by Aris Doxakis: thnx for your reply,
do i have to set utf-8 for each table or just set mysql for each database i have created???i set it uo from mysql administrator?
AFAIR If you build database using utf 8 then all tables will be utf 8 because you database default encoding is utf-8 along with this you will need to add some extra parameter to your connection string , it could be like :
the tables that i have on my dayabase are mostly with greek written data. sow when i use them in my jsp pages they are showed as $%#%^$@#$. do i have to setup my database as greek or my tables individualy??? and how because i cant find anything on the manuals
Okay. Now is that happening because the data in the database is corrupt, or because it is being corrupted when your JSP sends it to the browser? I suggested already to not test both of those things at the same time. So just write a Java application that reads from the database and displays data in a Swing GUI. If that shows correct data then you are doing the JSP wrong. If it shows incorrect data then the database is probably set up wrong.
i dont think there is anything corrupt in my database either
That doesn't sound like you did any testing at all. You still don't know that when you read something from your database, you get the correct data. The test you should do for the database is very simple: write a query that will return one column of one row, whose value you know. Then the test is this: