I’m implementing an online Python compiler for which I am using codemirror. When I try to execute the code from codemirror block, it is giving an error.
Here you can see the codemirror block and “Run” button.
On clicking “Run” button, I’m sharing code with our designed online IDE through localstorage.
Executing code in an online compiler giving us an error as
———
File “script.py”, line 1
SyntaxError: Non-UTF-8 code starting with ‘\x87’ in file script.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
——–
Looks like this is encoding issue. Please guide me.