[Geonetwork-devel] Chinese Insert problems

Hi, veryone,

I find problems to insert Chinese charecters into the backend database in GeoNetwork, but GeoNetwork can get those Chinese records correctly from the backend database which are inserted or changed by Mysql database management tools. This problem exists for all pages where information needs to be stroed in the database.

By the way, the encoding of Mysql database is utf8_bin, and my mysql config file may relate to this issue is:

[client]
port=3306
default-character-set=utf8

Here attached an example, please give me some hints or kindly help me fixing this problem. Thank you guys in advance.

Just an example, I want to insert a new category named “中文” by :
create a new category by http://127.0.0.1:8080/geonetwork/srv/en/category.get

after submitted, the tomcat console dispalys as the white part:
Output of Tomcat console

But the result page GeoNetwork shows is as following (the first record):

Insert result shown in Geonetwork

I checked the backend database Mysql by phpMyAdmin, which is the same (the first row with id 11):
Insert result shown in phpMyAdmin connecting to Mysql

But when I updated this record directly in phpMyAdmin as following (the record id=11):

update the record with a Chinese string in phpMyAdmin

Check the result in phpMyAdmin (first row with id=11):

the updated result shown in phpMyAdmin

And Check the result in GeoNetwork, it’s normal as I expect(the last one):
The updated result shown in GeoNetwork

(attachments)

1cn_insert.JPG
2cn_insert_server.JPG
3-1cn_insert_result.JPG
3-2cn_insert_result.JPG
4cn_insert_db.JPG
5-1cn_insert_db_result.JPG
5cn_insert_db_result.JPG