georchestra / ansible

Ansible playbooks to deploy a fullblown geOrchestra instance
ISC License
16 stars 12 forks source link

[ Encoding ] Console #71

Open pierrejego opened 4 years ago

pierrejego commented 4 years ago

When I use the playbook to install geOrchestra, I have errors with encoding character in console.

Encoding errors comes on all fields.

Step to reproduce :

Création new account with accent in name or any attribut : image

Go to admin to validate account, user have good encoding char : image

Before validate user : image

After validate user and click on save : image

Each time I try to update a user I have additional characters, samething on all element from console (User and Organisme)

Before click on save, information are OK in LDAP, after they are wrong.

I have the same console.war manually installed on a tomcat8/debian9 instance and I don't have this issue. I guess it comes from tomcat9 or debian10 but I can't manage to find what is the problem.

I had a look at currents issues in geOrchestra and find some interresting conversation, but no reason why this occured.

https://github.com/georchestra/georchestra/issues/3049 https://github.com/georchestra/georchestra/pull/3021 https://github.com/georchestra/georchestra/issues/2996 https://github.com/georchestra/georchestra/issues/2737 https://github.com/georchestra/georchestra/issues/2693

Does anyone have the same error with this ansible playbook ?

landryb commented 4 years ago

system encoding for tomcat ? iirc we try to force-set it.

fvanderbiest commented 4 years ago

I guess it's on master ?

pierrejego commented 4 years ago

@fvanderbiest I tried 19.04, 20.0.1, 20.0.x and Master war same effect.

@landryb thanks, that was it adding -Dfile.encoding=UTF-8 in JAVA_OPTS did the trick !! I let the issue open until I have my computer back to create a PR.

landryb commented 4 years ago

well, system locale is set in https://github.com/georchestra/ansible/blob/88df630625eb4fa402ae6f8e5eed0556c8d2a477/roles/postgresql/tasks/main.yml#L1 and passed to tomcat in https://github.com/georchestra/ansible/blob/7485996996b4fd250bdd617a996bf62245aeee64/roles/tomcat/templates/tomcat.service.j2#L11 - i see that geoserver already has -Dfile.encoding in https://github.com/georchestra/ansible/blob/b648feb7c25b2516a698f1e8f646f3d5f541f274/roles/tomcat/templates/config-geoserver.j2#L8 (dont remember why) - honestly, i dont know anymore what crap is needed to set the default encoding for tomcat.