Issue:
Bad encoding chars on the webpages (comments)
Environment: Ubuntu 12.04 LTS + tomcat6, Gerrit 2.9 stable
Database is already with utf8_bin.
Fix:
set in /etc/tomcat6/context.xml in <Resource> section (<!-- DB connector for gerrit -->):
connectionProperties="useUnicode=yes;characterEncoding=utf8;"
So in the end it will look something like this:
<Resource
name="jdbc/ReviewDb"
auth="Container"
type="javax.sql.DataSource"
maxActive="60"
maxIdle="30"
maxWait="10000"
username="gerrit"
password="somepassword"
driverClassName="com.mysql.jdbc.Driver"
factory="org.apache.commons.dbcp.BasicDataSourceFactory"
url="jdbc:mysql://your.mysql.server.tld:3306/gerrit"
connectionProperties="useUnicode=yes;characterEncoding=utf8;"
/>
I think it would be worth mentioning this in the documentation.