Relative Content

Tag Archive for javascriptpythonencodingspecial-charactersdecode

Special characters error decoding/encoding ‘utf-8’ Javascript/Python

The following code is made for to take a python code submission and encode and compare to the expected output in the db. However, when using special characters (‘´’, ‘~’, ‘ç’) it does not convert correctly
what causes an error in the comparison with the expected output.
For example, ‘print(‘não’)’, outputs to n�o, when it should obviously be ‘não’.