Wrong encoding in just 1 module

I run into a weird problem with my installation of suiteCRM it’s running on a version 7.11.5
My php is 7.1, also I think it’s important to mention I’m using the Polish language pack.

The bug is that when I go to target lists my encoding is all wrong produces words like odbiorców which should be odbiorców.
But when I go into other modules encoding is correct everything looks as it should.
I’m certain this is a recent development as I worked on this module before and it worked fine. No changes to this module were made, it’s the same as it came.

My database is in UTF-8 and I checked that module saves to the database with correct encoding, but somehow reads it wrong.

On Monday I managed to temporarily fix the issue with a combination of rebuilding relationships and quick repair & rebuild. But it appeared again.

In f12 I get these notices:
Some cookies are misusing the recommended “sameSite“ attribute 18

This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. [index.php]

Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. [sugar_grp1_jquery.js:4:18118]

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help http://xhr.spec.whatwg.org/

With only the last one (XMLHttpRequest ) being unique to the site with an encoding error

In logs I get this on loading the site:
23-11-2000 [11651][62f7d190-67a6-6b12-2ca9-5d2ed92d7625][ERROR] Unable to get proper side for link assigned_user_link
23-11-2000 [11651][62f7d190-67a6-6b12-2ca9-5d2ed92d7625][ERROR] Unable to get proper side for link assigned_user_link

I tried couple of solutions for other posts on this site about encoding errors but they didn’t help me. I have a problem figuring out the cause of this error, so if someone would manage to nudge me in the right direction I would be very grateful.
Sorry for a long post.

Never mind it was my error. I customised code in include/JSON.php to fix a problem I had in campaigns when choosing email template. Somehow json_encode() couldn’t transform array to json. Some encoding error. So I added a piece of code to force utf on a given file. It worked for campaigns but broke encoding for some modules using this json.

Case closed sorry for taking your time.