utf-8 error with EditorJS on linux

I have a project where I use EditorJS as a field in django admin.
It works rather well, but I discovered that django gives an error when I use non-ascii characters (i.e : àèç )

'ascii' codec can't encode character '\xe7' in position 188: ordinal not in range(128)

When I look directly in mySQL, the block data is saved as is :

                 "text_content":"here the non-àsçîî characters"

mysql charset for this field is : utf8mb4 ( as it should be … ?)

The BIG issue, is that I don’t get this error when using django dev server, but only when using a local openlitespeed server through ubuntu/WSL2 ( and I suspect I will have the same problem once deployed to my linux instance)

I spent two days trying to solve this … with no success.

Outside of EditorJS, django has no issues with utf-8, and even is able to display non-ascii characters in a editorJS block !, but only in the admin model page. The error occurs only when I try to display the content of said block inside the page template. ( and again … it works fine with dev server on windows, but fails on ubuntu )

Oh by the way, I am parsing editorJS json data using a templatetag filter

Also, at some point in my search, I added this to settings.py :

FILE_CHARSET = 'utf-8'

Does it help ?

Well, I sort of found a “solution” , a work around at least.
After trying to use a JSONField() to test the same data ( and having the exact same exception thrown at me)
I tried :

text_content = block["data"]["text_content"]
correct_content = text_content.encode("utf-8").decode()

before putting it in the context for the page template.

And it works !