Weird characters after language change

Third party plugins, patches, bugfixes
alaztetik
Newbie
Posts: 9
Joined: Sun Mar 12, 2023 11:07 pm

Weird characters after language change

Post 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?
User avatar
alberto
FormaLms Guru
Posts: 1140
Joined: Fri Mar 02, 2012 9:18 am
Contact:

Re: Weird characters after language change

Post by alberto »

Hi, could you please indicate exactly wich pages and translations to check?
alaztetik
Newbie
Posts: 9
Joined: Sun Mar 12, 2023 11:07 pm

Re: Weird characters after language change

Post 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
alfa24
Senior Boarder
Posts: 2078
Joined: Fri Nov 24, 2017 8:45 am

Re: Weird characters after language change

Post by alfa24 »

Are your pages displayed in utf-8?
Per supporto GRATUITO contattatemi in privato qui
User avatar
max
FormaLms Guru
Posts: 2744
Joined: Thu Mar 01, 2012 10:41 am
Version: forma.lms 2.4
Contact:

Re: Weird characters after language change

Post 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.
---------------------
Massimiliano Ferrari
Elearnit - Elearning e Knowledge Management
https://www.elearnit.net
https://www.linkedin.com/in/massimilianoferrari
m.ferrari[at]elearnit.net
Skype: m_ferrari_it
alaztetik
Newbie
Posts: 9
Joined: Sun Mar 12, 2023 11:07 pm

Re: Weird characters after language change

Post 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.
alfa24
Senior Boarder
Posts: 2078
Joined: Fri Nov 24, 2017 8:45 am

Re: Weird characters after language change

Post by alfa24 »

Ok, your pages are using the correct codepage.
Let's investigate on db collation. How is it configured?
Per supporto GRATUITO contattatemi in privato qui
alaztetik
Newbie
Posts: 9
Joined: Sun Mar 12, 2023 11:07 pm

Re: Weird characters after language change

Post by alaztetik »

which file should I look at for collation settings?

I browse through cPanel > File Manager.
alfa24
Senior Boarder
Posts: 2078
Joined: Fri Nov 24, 2017 8:45 am

Re: Weird characters after language change

Post by alfa24 »

You should go to phpmyadmin.
I can't offer the exact path, as I should be on your instance.
Per supporto GRATUITO contattatemi in privato qui
alaztetik
Newbie
Posts: 9
Joined: Sun Mar 12, 2023 11:07 pm

Re: Weird characters after language change

Post 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.
Last edited by alaztetik on Mon Mar 13, 2023 2:01 pm, edited 2 times in total.
Post Reply