Click here to Skip to main content
15,880,796 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i can store the hindi text using MySQL database wihtin database.

but when im using same process to store data into MySQL with java program
it showing ??????? marks.

How to store hindi text कंप्यूटर in mySQL using java program?
Posted
Comments
Mohibur Rashid 6-Dec-15 1:13am    
What is your encoding?
Try to set encoding. Follow the example:
con = DriverManager.getConnection("jdbc:mysql:///dbname?useUnicode=true&characterEncoding=utf-8", "user", "pass");
Akash gods 6-Dec-15 23:37pm    
thanks Mohibur Rashid, It's works :D
Sergey Alexandrovich Kryukov 6-Dec-15 13:19pm    
Use only Unicode data types in your database. Say, nchar and nvarchar, not char or varchar.
—SA
Maciej Los 6-Dec-15 14:00pm    
This is an answer!
Sergey Alexandrovich Kryukov 6-Dec-15 14:50pm    
Maybe. How are you doing?
—SA

1 solution

A set of articles about your issue: How to insert Unicode values to MySQL using Java[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 6-Dec-15 14:50pm    
Sure, a 5.
—SA
Maciej Los 6-Dec-15 15:01pm    
Thank you, Sergey.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900