Charset problems (ISO-8859-1 x UTF-8)

Hello all,

I started administering an OJS portal that has been without a lot of upgrades and maintenance for a long time. As a result, the system has problems with accent characters, typical of incorrect charset configuration.

The portal runs on FreeBSD whose default charset is ISO8859-1 and mysql tables are as ISO-8859-1.
PHP also has the ISO-8859-1 standard charset.

Today is as follows:

locale = pt_BR
client_charset = iso-8859-1
connection_charset = iso-8859-1
database_charset = iso-8859-1
charset_normalization = Off

OJS pages are incorrectly accented but publications are not.
I believe the database must have records in utf and iso-88591 because these values have changed several times.
How can I get this right? Should I migrate everything to utf-8 and recode the database?

Very soon I will need to migrate this site to another server that runs debian OS and keeps as default charset UTF-8.


Renato L. Sousa

Hi @rensousa,

When you say that publications are not showing correctly, can you describe what you mean?

Alec Smecher
Public Knowledge Project Team

hi @asmecher,

I refer to the display of the accentuation of the Portuguese language - Brazil (pt-BR).
I was able to fix it with the setting below:

locale = pt-BR
client_charset = utf-8
connection_charset = utf8
database_charset = utf8
charset_normalization = On

It took me a while to realize that I needed to clear data cache to apply the settings.



1 Like