vitorbaptista/chef-ckan — pull request #3 by wilhelmbot (2013-04-29 17:52:56+00:00)
Title: Fixes "encoding does not match locale" error on createdb

I'm passing template0 to create a virgin database (http://www.postgresql.org/docs/8.1/static/manage-ag-templatedbs.html) and thus fixing the issue with LATIN1 encoding. I'm also adding the locale param to match the encoding and default language.

Some references:

http://blog.crowdint.com/2011/08/11/postgresql-in-vagrant.html
http://stackoverflow.com/questions/8351436/change-lc-ctype-for-postgresql-and-postgis-use
http://stackoverflow.com/questions/5956163/postgres-databases-with-different-encoding