by
1
6
2,462
2
Top 1% !
Popular
Famous
Specified
Refined
OpenSource
Popularity: 7762nd place
Created
Modified Jun 25, 2013
No tags for this snippet yet.
Architecturex86_64
DBMSMySQL
LanguageJava
LicenseMIT_X11
OSWindows
Windows VersionWindows7

Communication with UTF-8 for MySQL use in Java

This is the way to use UTF-8 for the communiocation of a Java application towards a MySQL database
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/1170/Communication-with-UTF-8-for-MySQL-use-i?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
Class.forName("com.mysql.jdbc.Driver").newInstance();//call jdbc driver String url = "jdbc:mysql://localhost/unicode?useUnicode=true&characterEncoding=UTF-8";//getting url conn = DriverManager.getConnection(url,"root","");//create connection
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus