I am trying to insert some data into mysql DB via Java JDBC that contains some International characters.
INSERT INTO my_table (`name`, `lat`, `long`, `label`) VALUES('Ädelfors folkhögskola', '57.43611145019531', '15.19722175598145', 'Ädelfors folkhögskola')
This query works perfectly fine if i use it directly from mysqlworkbench, phpmyadmin, etc but when i try with java JDBC the international characters are completely garbled
Ädelfors folkhögskola => ?��delfors folkh??gskola
the solutions i have tried till now include
jdbc:mysql://server/database?characterEncoding=UTF-8
Setting - Dfile.encoding=UTF-8
Both my database and table are encoded as utf8 - default collation
this is the dump of "show variables like '%char%'"
character_set_client - utf8
character_set_connection - utf8
character_set_database - utf8
character_set_filesystem - binary
character_set_results - utf8
character_set_server - latin1
character_set_system - utf8
character_sets_dir - /usr/share/mysql/charsets/
I have tried using both preparesStatements as well as normal Statement
I know there are many similar questions and i have referred most of them but could find a solution.
Some info about environment... OS - Mac osx 10.6.8 IDE - netbeans
mysql 5.5.23 running on ubuntu