Message Boards Do Not Work On MySQL Unless Character Set is UTF-8

When the MySQL database is using a character set that is not UTF-8 (such as Latin1), new message boards posts with special characters like the one in the below screenshot cannot be published. You will see a, Message portlet unavailable message, and the following error:

RuntimePageImpl-15][render_portlet_jsp:132] null
java.sql.SQLException: Incorrect string value: '\xEF\x83\xA0 In...' for column 'subject' at row 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503) 

Resolution

Change the character set of the database to UTF-8. While this is a database operation, and not an out-of-the-box Liferay issue, here is a link that discusses how to do this.

这篇文章有帮助吗?
0 人中有 0 人觉得有帮助