Handle utf-8 input/output on windows