Page 1 of 2

Weird characters after language change

Posted: Sun Mar 12, 2023 11:15 pm
by alaztetik
Hello,

I searched the forum for the similar issue, but did not find anything.

I use a hosting service with Softaculous.

When I add a new language (Turkish here) to the system (importing from core), and switch from English to Turkish on the system, there seems to be character encoding problems with Turkish translation for specific words. (e.g ı replaces with ?)

The language file is in UTF-8 format.

Is the problem coming from database side?

Re: Weird characters after language change

Posted: Mon Mar 13, 2023 12:06 am
by alberto
Hi, could you please indicate exactly wich pages and translations to check?

Re: Weird characters after language change

Posted: Mon Mar 13, 2023 1:12 am
by alaztetik
The problem occurs everywhere in the system which includes Turkish-specific characters (e.g. ı, ş, ö, ç, ğ, ü).

From the Language > Translate section:

Code: Select all

_DIRECT_USER_INSERT
Bu yönetici taraf?ndan olu?turulan kullan?c?lar? do?rudan etkinle?tir
Activate directly the users created by this administrator

Code: Select all

_DIRECTORY_FILTER_templatename
?ablon Ad?
Template name
And also, when a user registers to the system, with a special character in the name, the name appears:

Correct:

Code: Select all

Aydan Şener
Result:

Code: Select all

Aydan S?ener

Re: Weird characters after language change

Posted: Mon Mar 13, 2023 6:25 am
by alfa24
Are your pages displayed in utf-8?

Re: Weird characters after language change

Posted: Mon Mar 13, 2023 9:08 am
by max
turkish_frontend.PNG
turkish_backend.PNG
This is an example of Forma displayed in Turkish, with all the special characters correctly displaying. I guess alfa24 is pointing you in the right direction.

Re: Weird characters after language change

Posted: Mon Mar 13, 2023 1:20 pm
by alaztetik
Are your pages displayed in utf-8?

I am not sure if I can answer that, but the sources of the pages have

Code: Select all

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
tag each.

Is there a way to change it in the app?

I use cPanel, so I try not to change the code directly, but I can try you recommend something.

Re: Weird characters after language change

Posted: Mon Mar 13, 2023 1:22 pm
by alfa24
Ok, your pages are using the correct codepage.
Let's investigate on db collation. How is it configured?

Re: Weird characters after language change

Posted: Mon Mar 13, 2023 1:34 pm
by alaztetik
which file should I look at for collation settings?

I browse through cPanel > File Manager.

Re: Weird characters after language change

Posted: Mon Mar 13, 2023 1:38 pm
by alfa24
You should go to phpmyadmin.
I can't offer the exact path, as I should be on your instance.

Re: Weird characters after language change

Posted: Mon Mar 13, 2023 1:48 pm
by alaztetik
In phpMyAdmin, in the information_schema database, it says utf8_general_ci for both COLLATIONS and COLLATION_CHARACTER_SET_APPLICABILITY.

Actually it is all set as utf8_general_ci.

in the Operations > comparison section, it is set to latin1_swedish_ci.

In forma_lms database, it is all set as to utf8_general_ci for all the tables.