My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2840: Documentation - gerrit 2.9 webpages encoding with tomcat6
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by kasz...@gmail.com, Aug 18, 2014
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.
Sign in to add a comment

Powered by Google Project Hosting