Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Pyrhel on July 09, 2020, 02:00:15 AM

Title: Error in non-latin characters encoding on editing
Post by: Pyrhel on July 09, 2020, 02:00:15 AM
Hello everyone!

Since last week we have very strange problem in our forum. It didn't happen before and no files have been updated or edited. All the posts in the forum are in Cyrillic. SMF: 2.0.17
The problem: someone (or I) post something - everything is normal. If I or he/she edit their post, every Cyrillic character becomes a UTF code. Here is an example:
"ั‚ะตัั‚" when edited becomes "%u0442%u0435%u0441%u0442".

I think my hosting have changed something, but they deny they've touched anything with my account or DB. Do you have any ideas what can be done?
Title: Re: Error in non-latin characters encoding on editing
Post by: Dzonny on July 09, 2020, 06:06:19 AM
Hello there.

When you get into phpMyAdmin what is the collation in each table?
Title: Re: Error in non-latin characters encoding on editing
Post by: Pyrhel on July 09, 2020, 07:47:58 AM
Each table has collation of utf8_general_ci
Title: Re: Error in non-latin characters encoding on editing
Post by: Arantor on July 09, 2020, 08:24:30 AM
It%u2019s a bug in 2.0.17.
Title: Re: Error in non-latin characters encoding on editing
Post by: shawnb61 on July 09, 2020, 12:30:18 PM
A temp fix is outlined here:
https://www.simplemachines.org/community/index.php?topic=571082.msg4042818#msg4042818

Note that updates to .js rarely take effect immediately - you have to force a browser refresh (usually shift-F5). 

You must revert the fix to script.js before applying any future SMF patch.

Title: Re: Error in non-latin characters encoding on editing
Post by: Pyrhel on July 09, 2020, 01:10:59 PM
Great! It seems it's working now, thank you!