openfire离线消息乱码(XMPP)
Openfire采用MySQL数据库后的中文乱码问题:
建立数据库的时候 create database openfire default character set utf8
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.
点击这里查看原文。
这个东西的原因无非就是编码错误。开始时用下面一句把数据库改了之后
alter database openfire default character set utf8 default collate utf8_general_ci;
改了服务器的的连接字符串还是不行。
一怒之下,删除openfire,删除数据库重装。
dpkg -P openfire
dpkg -i openfire.deb
结果好了。