how to write chinese caracters into mysql with hibernate?









up vote
3
down vote

favorite












im making a web application with javascript. Im using java servlet wich is connected with mysql database with hibernate. in Servlet there is a String in chinese, and when i try to write that strin into mysql field it shows up as "?" in mysql. my whole project in netbeans is set to charset=UTF-8. I tried to set collation and charset in database to utf-8, utf8mb4, big5 and none of them works. i also tried to change my column from varchar to nvarchar but when i click apply (mysql workbench) the column is still "varchar".



this is my servlet



protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("application/json");
String tabla=request.getParameter("tabla");
//String tabla contains chinese caracters
String user=request.getParameter("user");
Configuration myConf = new Configuration();
myConf.configure("hib/hibernate.cfg.xml");
StandardServiceRegistry service = new StandardServiceRegistryBuilder().
applySettings(myConf.getProperties()).build();
SessionFactory myFactory = myConf.buildSessionFactory(service);
Session conn = myFactory.openSession();
Transaction t = conn.beginTransaction();

List<User>upislista;
upislista=conn.createQuery("SELECT u FROM User u WHERE useUsername='"+user+"'").list();
upislista.get(0).setUseKineski(tabla);





t.commit();
conn.close();









share|improve this question





















  • netbeans and browser can recognize chinese characters, only mysql show them as "???".
    – Danilo99
    Nov 9 at 15:17










  • Have you tried changing the font to a more utf8 friendly font? stackoverflow.com/questions/9553386/… en.wikipedia.org/wiki/Unicode_font
    – Sedrick
    Nov 9 at 15:31










  • I would try GNU_Unifont in the Resultset Grid:.
    – Sedrick
    Nov 9 at 15:38










  • i tried that now and it still doesnt work. when i try to change column from varchar to nvarchar and in same tame set column collation "utf-8 default" it shows error. ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHARACTER SET 'utf8' NULL DEFAULT NULL' at line 2 SQL Statement: ALTER TABLE kineski.kineski CHANGE COLUMN kin_tekst kin_tekst NVARCHAR(4000) CHARACTER SET 'utf8' NULL DEFAULT NULL
    – Danilo99
    Nov 9 at 15:46











  • Did you restart mysql workbench after the change?
    – Sedrick
    Nov 9 at 15:48














up vote
3
down vote

favorite












im making a web application with javascript. Im using java servlet wich is connected with mysql database with hibernate. in Servlet there is a String in chinese, and when i try to write that strin into mysql field it shows up as "?" in mysql. my whole project in netbeans is set to charset=UTF-8. I tried to set collation and charset in database to utf-8, utf8mb4, big5 and none of them works. i also tried to change my column from varchar to nvarchar but when i click apply (mysql workbench) the column is still "varchar".



this is my servlet



protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("application/json");
String tabla=request.getParameter("tabla");
//String tabla contains chinese caracters
String user=request.getParameter("user");
Configuration myConf = new Configuration();
myConf.configure("hib/hibernate.cfg.xml");
StandardServiceRegistry service = new StandardServiceRegistryBuilder().
applySettings(myConf.getProperties()).build();
SessionFactory myFactory = myConf.buildSessionFactory(service);
Session conn = myFactory.openSession();
Transaction t = conn.beginTransaction();

List<User>upislista;
upislista=conn.createQuery("SELECT u FROM User u WHERE useUsername='"+user+"'").list();
upislista.get(0).setUseKineski(tabla);





t.commit();
conn.close();









share|improve this question





















  • netbeans and browser can recognize chinese characters, only mysql show them as "???".
    – Danilo99
    Nov 9 at 15:17










  • Have you tried changing the font to a more utf8 friendly font? stackoverflow.com/questions/9553386/… en.wikipedia.org/wiki/Unicode_font
    – Sedrick
    Nov 9 at 15:31










  • I would try GNU_Unifont in the Resultset Grid:.
    – Sedrick
    Nov 9 at 15:38










  • i tried that now and it still doesnt work. when i try to change column from varchar to nvarchar and in same tame set column collation "utf-8 default" it shows error. ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHARACTER SET 'utf8' NULL DEFAULT NULL' at line 2 SQL Statement: ALTER TABLE kineski.kineski CHANGE COLUMN kin_tekst kin_tekst NVARCHAR(4000) CHARACTER SET 'utf8' NULL DEFAULT NULL
    – Danilo99
    Nov 9 at 15:46











  • Did you restart mysql workbench after the change?
    – Sedrick
    Nov 9 at 15:48












up vote
3
down vote

favorite









up vote
3
down vote

favorite











im making a web application with javascript. Im using java servlet wich is connected with mysql database with hibernate. in Servlet there is a String in chinese, and when i try to write that strin into mysql field it shows up as "?" in mysql. my whole project in netbeans is set to charset=UTF-8. I tried to set collation and charset in database to utf-8, utf8mb4, big5 and none of them works. i also tried to change my column from varchar to nvarchar but when i click apply (mysql workbench) the column is still "varchar".



this is my servlet



protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("application/json");
String tabla=request.getParameter("tabla");
//String tabla contains chinese caracters
String user=request.getParameter("user");
Configuration myConf = new Configuration();
myConf.configure("hib/hibernate.cfg.xml");
StandardServiceRegistry service = new StandardServiceRegistryBuilder().
applySettings(myConf.getProperties()).build();
SessionFactory myFactory = myConf.buildSessionFactory(service);
Session conn = myFactory.openSession();
Transaction t = conn.beginTransaction();

List<User>upislista;
upislista=conn.createQuery("SELECT u FROM User u WHERE useUsername='"+user+"'").list();
upislista.get(0).setUseKineski(tabla);





t.commit();
conn.close();









share|improve this question













im making a web application with javascript. Im using java servlet wich is connected with mysql database with hibernate. in Servlet there is a String in chinese, and when i try to write that strin into mysql field it shows up as "?" in mysql. my whole project in netbeans is set to charset=UTF-8. I tried to set collation and charset in database to utf-8, utf8mb4, big5 and none of them works. i also tried to change my column from varchar to nvarchar but when i click apply (mysql workbench) the column is still "varchar".



this is my servlet



protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("application/json");
String tabla=request.getParameter("tabla");
//String tabla contains chinese caracters
String user=request.getParameter("user");
Configuration myConf = new Configuration();
myConf.configure("hib/hibernate.cfg.xml");
StandardServiceRegistry service = new StandardServiceRegistryBuilder().
applySettings(myConf.getProperties()).build();
SessionFactory myFactory = myConf.buildSessionFactory(service);
Session conn = myFactory.openSession();
Transaction t = conn.beginTransaction();

List<User>upislista;
upislista=conn.createQuery("SELECT u FROM User u WHERE useUsername='"+user+"'").list();
upislista.get(0).setUseKineski(tabla);





t.commit();
conn.close();






java mysql database hibernate encoding






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 9 at 15:12









Danilo99

187




187











  • netbeans and browser can recognize chinese characters, only mysql show them as "???".
    – Danilo99
    Nov 9 at 15:17










  • Have you tried changing the font to a more utf8 friendly font? stackoverflow.com/questions/9553386/… en.wikipedia.org/wiki/Unicode_font
    – Sedrick
    Nov 9 at 15:31










  • I would try GNU_Unifont in the Resultset Grid:.
    – Sedrick
    Nov 9 at 15:38










  • i tried that now and it still doesnt work. when i try to change column from varchar to nvarchar and in same tame set column collation "utf-8 default" it shows error. ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHARACTER SET 'utf8' NULL DEFAULT NULL' at line 2 SQL Statement: ALTER TABLE kineski.kineski CHANGE COLUMN kin_tekst kin_tekst NVARCHAR(4000) CHARACTER SET 'utf8' NULL DEFAULT NULL
    – Danilo99
    Nov 9 at 15:46











  • Did you restart mysql workbench after the change?
    – Sedrick
    Nov 9 at 15:48
















  • netbeans and browser can recognize chinese characters, only mysql show them as "???".
    – Danilo99
    Nov 9 at 15:17










  • Have you tried changing the font to a more utf8 friendly font? stackoverflow.com/questions/9553386/… en.wikipedia.org/wiki/Unicode_font
    – Sedrick
    Nov 9 at 15:31










  • I would try GNU_Unifont in the Resultset Grid:.
    – Sedrick
    Nov 9 at 15:38










  • i tried that now and it still doesnt work. when i try to change column from varchar to nvarchar and in same tame set column collation "utf-8 default" it shows error. ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHARACTER SET 'utf8' NULL DEFAULT NULL' at line 2 SQL Statement: ALTER TABLE kineski.kineski CHANGE COLUMN kin_tekst kin_tekst NVARCHAR(4000) CHARACTER SET 'utf8' NULL DEFAULT NULL
    – Danilo99
    Nov 9 at 15:46











  • Did you restart mysql workbench after the change?
    – Sedrick
    Nov 9 at 15:48















netbeans and browser can recognize chinese characters, only mysql show them as "???".
– Danilo99
Nov 9 at 15:17




netbeans and browser can recognize chinese characters, only mysql show them as "???".
– Danilo99
Nov 9 at 15:17












Have you tried changing the font to a more utf8 friendly font? stackoverflow.com/questions/9553386/… en.wikipedia.org/wiki/Unicode_font
– Sedrick
Nov 9 at 15:31




Have you tried changing the font to a more utf8 friendly font? stackoverflow.com/questions/9553386/… en.wikipedia.org/wiki/Unicode_font
– Sedrick
Nov 9 at 15:31












I would try GNU_Unifont in the Resultset Grid:.
– Sedrick
Nov 9 at 15:38




I would try GNU_Unifont in the Resultset Grid:.
– Sedrick
Nov 9 at 15:38












i tried that now and it still doesnt work. when i try to change column from varchar to nvarchar and in same tame set column collation "utf-8 default" it shows error. ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHARACTER SET 'utf8' NULL DEFAULT NULL' at line 2 SQL Statement: ALTER TABLE kineski.kineski CHANGE COLUMN kin_tekst kin_tekst NVARCHAR(4000) CHARACTER SET 'utf8' NULL DEFAULT NULL
– Danilo99
Nov 9 at 15:46





i tried that now and it still doesnt work. when i try to change column from varchar to nvarchar and in same tame set column collation "utf-8 default" it shows error. ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHARACTER SET 'utf8' NULL DEFAULT NULL' at line 2 SQL Statement: ALTER TABLE kineski.kineski CHANGE COLUMN kin_tekst kin_tekst NVARCHAR(4000) CHARACTER SET 'utf8' NULL DEFAULT NULL
– Danilo99
Nov 9 at 15:46













Did you restart mysql workbench after the change?
– Sedrick
Nov 9 at 15:48




Did you restart mysql workbench after the change?
– Sedrick
Nov 9 at 15:48












2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted










Hibernate XML:



<property name="hibernate.connection.CharSet">utf8mb4</property>
<property name="hibernate.connection.characterEncoding">utf8</property>
<property name="hibernate.connection.useUnicode">true</property>


Connection url:



db.url=jdbc:mysql://localhost:3306/db_nameuseUnicode=true&character_set_server=utf8mb4


The above changes were enough for me to upgrade from utf8 to utf8mb4 charset scheme.



As a side note I would like to make one clarification that UTF-8 is the character encoding while utf8mb4 is a character set that MySQL supports. MySQL's utf8mb4 is a superset to MySQL's utf8.



Spring/Hibernate filter:



<form accept-charset="UTF-8">


Spring/Hibernate:



<property name="url" value="jdbc:mysql://localhost:3306/miniprojetjee?useUnicode=true&connectionCollation=utf8_general_ci&characterSetResults=utf8&characterEncoding=utf-8"/> (or maybe it is =yes)


"Spring":



@RequestMapping(value = "/getRegion2", produces="application/json; charset=UTF-8",method = RequestMethod.GET)





share|improve this answer




















  • thank you very much. It finally works.
    – Danilo99
    Nov 9 at 23:45

















up vote
0
down vote













不知道你用的哪个版本的mysql, 但是你需要配置mysql



character_set_server=utf8mb4


一些版本hibernate能够正确配置,但是一些版本需要你手动配置。






share|improve this answer




















  • where do i type "character_set_server=utf8mb4". Im sorry if it is a stupid question but im beginner when it comes to mysql and hibernate. can you please write in English because i cant read Chinese.
    – Danilo99
    Nov 9 at 16:21










  • sorry I thought you can read Chinese. Rick James 's answer works. And if you want to get more info, you can read the official document: dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html and attention the version is the right one
    – Niuhuru Lang
    2 days ago











  • I will for sure, tanks.
    – Danilo99
    2 days ago










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53228364%2fhow-to-write-chinese-caracters-into-mysql-with-hibernate%23new-answer', 'question_page');

);

Post as a guest






























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










Hibernate XML:



<property name="hibernate.connection.CharSet">utf8mb4</property>
<property name="hibernate.connection.characterEncoding">utf8</property>
<property name="hibernate.connection.useUnicode">true</property>


Connection url:



db.url=jdbc:mysql://localhost:3306/db_nameuseUnicode=true&character_set_server=utf8mb4


The above changes were enough for me to upgrade from utf8 to utf8mb4 charset scheme.



As a side note I would like to make one clarification that UTF-8 is the character encoding while utf8mb4 is a character set that MySQL supports. MySQL's utf8mb4 is a superset to MySQL's utf8.



Spring/Hibernate filter:



<form accept-charset="UTF-8">


Spring/Hibernate:



<property name="url" value="jdbc:mysql://localhost:3306/miniprojetjee?useUnicode=true&connectionCollation=utf8_general_ci&characterSetResults=utf8&characterEncoding=utf-8"/> (or maybe it is =yes)


"Spring":



@RequestMapping(value = "/getRegion2", produces="application/json; charset=UTF-8",method = RequestMethod.GET)





share|improve this answer




















  • thank you very much. It finally works.
    – Danilo99
    Nov 9 at 23:45














up vote
1
down vote



accepted










Hibernate XML:



<property name="hibernate.connection.CharSet">utf8mb4</property>
<property name="hibernate.connection.characterEncoding">utf8</property>
<property name="hibernate.connection.useUnicode">true</property>


Connection url:



db.url=jdbc:mysql://localhost:3306/db_nameuseUnicode=true&character_set_server=utf8mb4


The above changes were enough for me to upgrade from utf8 to utf8mb4 charset scheme.



As a side note I would like to make one clarification that UTF-8 is the character encoding while utf8mb4 is a character set that MySQL supports. MySQL's utf8mb4 is a superset to MySQL's utf8.



Spring/Hibernate filter:



<form accept-charset="UTF-8">


Spring/Hibernate:



<property name="url" value="jdbc:mysql://localhost:3306/miniprojetjee?useUnicode=true&connectionCollation=utf8_general_ci&characterSetResults=utf8&characterEncoding=utf-8"/> (or maybe it is =yes)


"Spring":



@RequestMapping(value = "/getRegion2", produces="application/json; charset=UTF-8",method = RequestMethod.GET)





share|improve this answer




















  • thank you very much. It finally works.
    – Danilo99
    Nov 9 at 23:45












up vote
1
down vote



accepted







up vote
1
down vote



accepted






Hibernate XML:



<property name="hibernate.connection.CharSet">utf8mb4</property>
<property name="hibernate.connection.characterEncoding">utf8</property>
<property name="hibernate.connection.useUnicode">true</property>


Connection url:



db.url=jdbc:mysql://localhost:3306/db_nameuseUnicode=true&character_set_server=utf8mb4


The above changes were enough for me to upgrade from utf8 to utf8mb4 charset scheme.



As a side note I would like to make one clarification that UTF-8 is the character encoding while utf8mb4 is a character set that MySQL supports. MySQL's utf8mb4 is a superset to MySQL's utf8.



Spring/Hibernate filter:



<form accept-charset="UTF-8">


Spring/Hibernate:



<property name="url" value="jdbc:mysql://localhost:3306/miniprojetjee?useUnicode=true&connectionCollation=utf8_general_ci&characterSetResults=utf8&characterEncoding=utf-8"/> (or maybe it is =yes)


"Spring":



@RequestMapping(value = "/getRegion2", produces="application/json; charset=UTF-8",method = RequestMethod.GET)





share|improve this answer












Hibernate XML:



<property name="hibernate.connection.CharSet">utf8mb4</property>
<property name="hibernate.connection.characterEncoding">utf8</property>
<property name="hibernate.connection.useUnicode">true</property>


Connection url:



db.url=jdbc:mysql://localhost:3306/db_nameuseUnicode=true&character_set_server=utf8mb4


The above changes were enough for me to upgrade from utf8 to utf8mb4 charset scheme.



As a side note I would like to make one clarification that UTF-8 is the character encoding while utf8mb4 is a character set that MySQL supports. MySQL's utf8mb4 is a superset to MySQL's utf8.



Spring/Hibernate filter:



<form accept-charset="UTF-8">


Spring/Hibernate:



<property name="url" value="jdbc:mysql://localhost:3306/miniprojetjee?useUnicode=true&connectionCollation=utf8_general_ci&characterSetResults=utf8&characterEncoding=utf-8"/> (or maybe it is =yes)


"Spring":



@RequestMapping(value = "/getRegion2", produces="application/json; charset=UTF-8",method = RequestMethod.GET)






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 9 at 23:33









Rick James

63.8k55593




63.8k55593











  • thank you very much. It finally works.
    – Danilo99
    Nov 9 at 23:45
















  • thank you very much. It finally works.
    – Danilo99
    Nov 9 at 23:45















thank you very much. It finally works.
– Danilo99
Nov 9 at 23:45




thank you very much. It finally works.
– Danilo99
Nov 9 at 23:45












up vote
0
down vote













不知道你用的哪个版本的mysql, 但是你需要配置mysql



character_set_server=utf8mb4


一些版本hibernate能够正确配置,但是一些版本需要你手动配置。






share|improve this answer




















  • where do i type "character_set_server=utf8mb4". Im sorry if it is a stupid question but im beginner when it comes to mysql and hibernate. can you please write in English because i cant read Chinese.
    – Danilo99
    Nov 9 at 16:21










  • sorry I thought you can read Chinese. Rick James 's answer works. And if you want to get more info, you can read the official document: dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html and attention the version is the right one
    – Niuhuru Lang
    2 days ago











  • I will for sure, tanks.
    – Danilo99
    2 days ago














up vote
0
down vote













不知道你用的哪个版本的mysql, 但是你需要配置mysql



character_set_server=utf8mb4


一些版本hibernate能够正确配置,但是一些版本需要你手动配置。






share|improve this answer




















  • where do i type "character_set_server=utf8mb4". Im sorry if it is a stupid question but im beginner when it comes to mysql and hibernate. can you please write in English because i cant read Chinese.
    – Danilo99
    Nov 9 at 16:21










  • sorry I thought you can read Chinese. Rick James 's answer works. And if you want to get more info, you can read the official document: dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html and attention the version is the right one
    – Niuhuru Lang
    2 days ago











  • I will for sure, tanks.
    – Danilo99
    2 days ago












up vote
0
down vote










up vote
0
down vote









不知道你用的哪个版本的mysql, 但是你需要配置mysql



character_set_server=utf8mb4


一些版本hibernate能够正确配置,但是一些版本需要你手动配置。






share|improve this answer












不知道你用的哪个版本的mysql, 但是你需要配置mysql



character_set_server=utf8mb4


一些版本hibernate能够正确配置,但是一些版本需要你手动配置。







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 9 at 15:34









Niuhuru Lang

10310




10310











  • where do i type "character_set_server=utf8mb4". Im sorry if it is a stupid question but im beginner when it comes to mysql and hibernate. can you please write in English because i cant read Chinese.
    – Danilo99
    Nov 9 at 16:21










  • sorry I thought you can read Chinese. Rick James 's answer works. And if you want to get more info, you can read the official document: dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html and attention the version is the right one
    – Niuhuru Lang
    2 days ago











  • I will for sure, tanks.
    – Danilo99
    2 days ago
















  • where do i type "character_set_server=utf8mb4". Im sorry if it is a stupid question but im beginner when it comes to mysql and hibernate. can you please write in English because i cant read Chinese.
    – Danilo99
    Nov 9 at 16:21










  • sorry I thought you can read Chinese. Rick James 's answer works. And if you want to get more info, you can read the official document: dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html and attention the version is the right one
    – Niuhuru Lang
    2 days ago











  • I will for sure, tanks.
    – Danilo99
    2 days ago















where do i type "character_set_server=utf8mb4". Im sorry if it is a stupid question but im beginner when it comes to mysql and hibernate. can you please write in English because i cant read Chinese.
– Danilo99
Nov 9 at 16:21




where do i type "character_set_server=utf8mb4". Im sorry if it is a stupid question but im beginner when it comes to mysql and hibernate. can you please write in English because i cant read Chinese.
– Danilo99
Nov 9 at 16:21












sorry I thought you can read Chinese. Rick James 's answer works. And if you want to get more info, you can read the official document: dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html and attention the version is the right one
– Niuhuru Lang
2 days ago





sorry I thought you can read Chinese. Rick James 's answer works. And if you want to get more info, you can read the official document: dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html and attention the version is the right one
– Niuhuru Lang
2 days ago













I will for sure, tanks.
– Danilo99
2 days ago




I will for sure, tanks.
– Danilo99
2 days ago

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53228364%2fhow-to-write-chinese-caracters-into-mysql-with-hibernate%23new-answer', 'question_page');

);

Post as a guest