opened
csancineto
username_0
### Concerto Platform version
5.0.13

### Expected behavior
Text using unicode to be shown correctly 

### Actual behavior
Accented texts are displayed incorrectly. The templates are in UTF-8 but they are shown in a different codification.

### Steps to reproduce the issue
I'm using Concerto installed in my University's server. When I use the internal container databases, the test is presented correctly. When I use external sql databases (to improve the performance), all the texts are presented incorrectly when I run the tests. When the templates are opened internally, all the texts are in UTF-8; when presented, the same templates are corrupt. 

A simple test that shows the problem is in the following link:
https://concerto.sites.ufsc.br/test/teste

<img width="1182" alt="Captura de Tela 2020-07-21 às 17 18 51" src="https://user-images.githubusercontent.com/68610931/88102821-908d9a00-cb76-11ea-9296-b917374ec0c1.png">

<img width="1182" alt="Captura de Tela 2020-07-21 às 17 18 39" src="https://user-images.githubusercontent.com/68610931/88102795-87043200-cb76-11ea-9193-d37e46caaae5.png">
UTF8 issues when using external sql databases
issue
created
bkielczewski
username_1
Hi. 

Is your Concerto installation on University's server a bare-metal installation, not using the container we provide? 

If so, this would look like the operating system doesn't have `en_US.UTF8` locale enabled. R interpreter needs this to handle UTF-8 properly in the strings. It is used when you run the test and isn't involved when you just use the admin panel. This would explain why you see the text correctly there but not when running the test. 

To address this on the server Concerto is running on add this line to `/etc/locale.gen`:

    en_US.UTF-8 UTF-8

Then execute:

    locale-gen "en_US.UTF-8"

Best,
b.
comment
created
csancineto
username_0
Thank you very much. I forwarded your answer to the professional responsible for installing the Concert. As soon as I get a return from him, I'll indicate if it worked.
comment
created
josenorberto
username_2
Hi!

I was in contact with @username_0 to address this issue.
I made a pull request (https://github.com/campsych/concerto-platform/pull/295) with the solution to the encoding problem we were facing with our University's MySQL server.

Best regards,
José Norberto Guiz Fernandes Corrêa
comment