I am geting data stored as ¥à¤¨à¥ à¤à¤°à¤¨à¥ in mysql . It works fine in localhost but in remote mysql (in plesk) it is not working.
i have used the following:
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
in servlet and
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/projectkkm?useUnicode=yes&characterEncoding=UTF-8","root","");
in database connection
<%@page pageEncoding="UTF-8" %>
in jsp
Now as per my research i found that the problem is in Java.
java for linux do not support hindi text see url: http://www.oracle.com/technetwork/java/javase/javase7locales-334809.html
In my localhost (Windows) its work fine but when I deploy it to the centos(linux ) platform its not working.
I think the problem may be in window/linux compatibility.
Can anybody help me to handle this. I am sure problem is not from mysql side.
3
Answers
use above code in your tomcat apache server config file
Seems like your remote db is not configured properly.
should show
If not you should fix you /etc/mysql/my.cnf
add the following configs in the [mysqld] section
put in the [client] and [mysqldump] sections:
restart mysql after that
Try adding,
in web.xml