java program with special characters and database
===

First of all i know that this problem is known, and have a lot of answers, but mine is little bit different or unusual.

So, i'm using Eclipse SDK Version: 3.7.1, and i'm developing java app (JRE 1.7) which will work with database.

Since application is in Croatian language i have problems with special characters (č,ć,đ) and their insert into DB (mysql dbms, embedded with xampp).

However, i know little about encoding stuff, and i tried to set DB to cp1250_croatian_ci, UTF8_unicode_ci, UTF8_general_ci, latin2_croatian_ci, but sadly i had same problem with each of those. (is it mandatory to SET NAMES utf8 (or something like that) after each connection to DB?) 

Also, i want to point it out, that inserting (č,ć,đ) inside phpMyAdmin works fine.

So if i want to insert into DB characters "č,ć,đ" they are represented as "?". So basicly that means that encoding or charset or something else is problem.

Also i'm using JDBC driver: mysql-connector-java-5.1.18-bin 
From: http://dev.mysql.com/doc/refman/5.1/en/connector-j.html

I want to mention that i didn't have problems, while DB was hosted on godaddy.com server

In addition project text encoding (in Eclipse) is set to "Inherited from container (CP1250)", also i tried with UTF-8 but that didn't help me.

So, if someone know how to solve this issue, i'll be really thankful.

However, i know that people on this site like code, but i this particular problem, i don't think it will help (also it is really big). But, if for your answer code is needed i will post it.

Thanks in advance!

