Openfire: Offline UTF-8 encoded messages are saved wrong

爱⌒轻易说出口 提交于 2019-12-01 10:12:21

MySQL does not have proper Unicode support, which makes supporting data in non-Western languages difficult. However, the MySQL JDBC driver has a workaround which can be enabled by adding

?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8

to the URL of the JDBC driver. You can edit the conf/openfire.xml file to add this value.

Note: If the mechanism you use to configure a JDBC URL is XML-based, you will need to use the XML character literal & to separate configuration parameters, as the ampersand is a reserved character for XML.

Also be sure that your DB and tables have utf8 encoding.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!