I'm trying add a participatory document to a proposal.
I get crash when attempting to upload the document (I've tried different text and different documents but the same thing keeps happening)
Digging around a bit
My output from echo $LANG is en_US.UTF-8 so my os is thing UTF-8
The encoding of my postgres database is: UTF8, collate: en_US.UTF-8, Ctype: en_US.UTF-8 - so the DB is all good.
I could only think that for some reason that some non UTF-8 characters had been placed into the app by Decidim - most likely during the seeding process (I'm working on a test install and so have used the seed.rb script).
After much googling the problem I think I found the answer.
in config/database.yml the default encoding is set to unicode.
default: &default
adapter: postgresql
encoding: unicode
encoding: utf8
I set this to utf8 and created a new Decidim install (without seeding the test data) and all is good.
So my issue is fixed.
I suspect that others may come across it.
Would it be an idea to update the install documentation to say either..
Set your OS and Postgres to use unicode
If you are using UTF-8, then change the setting in config/database.yml
Hello,
I'm trying add a participatory document to a proposal.
I get crash when attempting to upload the document (I've tried different text and different documents but the same thing keeps happening)
Digging around a bit
My output from
echo $LANG
is en_US.UTF-8 so my os is thing UTF-8The encoding of my postgres database is: UTF8, collate: en_US.UTF-8, Ctype: en_US.UTF-8 - so the DB is all good.
I could only think that for some reason that some non UTF-8 characters had been placed into the app by Decidim - most likely during the seeding process (I'm working on a test install and so have used the seed.rb script).
After much googling the problem I think I found the answer.
in config/database.yml the default encoding is set to unicode.
default: &default adapter: postgresql
encoding: unicode
encoding: utf8
I set this to utf8 and created a new Decidim install (without seeding the test data) and all is good.
So my issue is fixed.
I suspect that others may come across it.
Would it be an idea to update the install documentation to say either..