Update: I've fixed it by including the line:
#pragma execution_character_set("utf-8")
at the beginning of the sketch.