From last month I was thinking on starting a blog to share my experiences and opinions. Remembering a time when I was novice and started this blog to share mostly technical stuff I learned. Searching through old emails I found lot of old conversations along with this blog details. So, why not use this blog! What's wrong in reusing and reorganizing old stuff when we can. Hopefully will start from updating profile.
Few days back, I was working on one project, Project was in MySql, Java. I had to do Java, MySql Connectivity. My database was in Gujarati. (Unicode, UTF-8) To do MySql database connection using Java is very easy. string url = "jdbc:mysql://ServerIPAddress:3306/DatabaseName Where, 1. jdbc : Driver specification 2. mysql : Defining MySql database is used. 3. ServerIPAddress : This is the IP Address of the database server 4. 3306 : Port 5. DatabaseName : Name of Database So I thought this is perfect for connectivity.. Oops... but garbage value displayed when I fetched data. So what to do? I had spent 1 week to find out what is the problem? Where is the problem? Finally, I found the solution, Need to pass parameter for Unicode support. Then, I used below string as connection: string url = "jdbc:mysql://ServerIPAddress:3306/DatabaseName?useUnicode=true&characterEncoding=UTF8"; and its done. useUnicode=true&characterEncoding=UTF8 : Property...
Comments