Skip to content

Exception: "'utf-8' codec can't decode byte 0xe5 in position 23: invalid continuation byte" #76

Description

@davidsule

Can't handle special characters in print() statement, throws the above exception (I tried with the Danish 'å' letter.)

In addition, at submission, because of the issue, it replaces the special characters with others, producing a 'Wrong answer' result.

Traceback (most recent call last):
  File "C:\Users\path\to\Kat-master\kattis.py", line 40, in main
    execCommand[command](data)
  File "C:\Users\path\to\Kat-master\commands\test.py", line 57, in testCommand
    result, time = runSingleTest(command, directory, inF, ansF)
  File "C:\Users\path\to\Kat-master\commands\test.py", line 107, in runSingleTest
    subprocess.run(command, stdout=subprocess.PIPE, input=inp, cwd=directory)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe5 in position 23: invalid continuation byte

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions