Garbled text for LTR languages on vanilla debian 10 HestiaCP server

Hey Guys,
Noob Alert!
I have a vanilla Debian 10 Server, running HestiaCP, Wordpress on WPML plugin having display issues with LTR languages. All LTR languages appear garbled. Any ideas how I can identify what is the main culprit or missing patch?

Thanks for any and all pointers!

you probably want to set a proper locale for your system. may also be that you need to add specific charsets to your apache config (if you use that).

that’s not neccessarily HestiaCP related but rather a system specific setting, that you need to modify yourself, based on your needs.

@falzo, thank you for your response. It is a multi-lingual site whose base is English. What i noticed is, all other right-to-left languages i.e., asian, middle eastern and any RTL language appears garbled. Hence i am trying to figure out what package i should apt-get. Is this debian 10 missing package or apache?

I’m using HestiaCP “as is”. No modification whatsoever to the webserver portion. Does it narrow down anything?

Thank you for your kind inputs.

I have to admit I lack experience with RTL languages and charsets for it… probably approach it more generally by checking about charsets and how to handle them: Introduction to Character Set and Character Encoding For WordPress Users | by Naresh Devineni | Medium

essentially you need to make sure, that the connection between mysql and php speak and understand the same charset and encoding. I’d assume there is something off there. did you migrate/import your wordpress from an existing installation?

the garbled chars often appear if the encoding setting are different from old to new system, so it could be something you need to address when exporting/importing your database already - obviously depends on how you did a potential migration here.

@falzo You’re like the oracle in the matrix. Indeed i am migrating servers. The existing is a shared hosting on godaddy. The new environment is a digital ocean debian 10 as mentioned. I can’t possibly go back to them to ask how to solve this as i am migrating out. Neither does DigitalOcean care. Most of my clients are not getting timely replies if any.

You think this is a php-mysql issue? Meaning some extension needs to be enabled?

Thank you so much for your inputs!

@AlifOpenSrc no rather no extension needed. databases in mysql always have a charset and collation definition, which tells how and what chars are or can be stored. then your systemmight have it’s own locale and charset setting. what now can happen is that you export your wordpress database on the old system and it gets saved in specific format based on the settings of the old system.
now when you copy it over to a new system and that has a different locale/charset it might read the data wrong from the export-file already.

maybe you can check via phpmyadmin and by looking into your wordpress database, if the chars are garbled there already. if that’s the case then probably your import did not work well. if the chars are correct in the database but are still displayed wrong then php might need a setting to asked for the data from the database with a different collation already,

I am sorry, there is no easy way to explain, as this issue or topic of charsets can have multiple angles.
maybe for starters:
how did you do the migration?
manually or with some WP plugin?
what is the locale set to on your VPS?

1 Like

Hi @falzo thank you for your attempts and efforts to help. Unfortunately, client choose to go a different direction. Subscribing to the plugin vendor’s paid support I hear. So i’m off the case. Nonethelss, apologies for the hiatus and thank you for your kind efforts.