Workaround for issue #305

I just tried to make it work, it might be wrong/dangerous/garbage.
Please review.

Signed-off-by: Ｖ字龍(Vdragon) <pika1021@gmail.com>
core: always use utf-8 when encoding for stdout/stderr

Using the stdout and stderr encodings causes unicode encode errors
on Windows.

Use utf-8 when writing to stdout and stderr to fix writing unicode
error messages to the shell.

Related-to: #305
Helped-by: Ｖ字龍(Vdragon) <pika1021@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Merge branch 'win32/unicode'

* win32/unicode:
  core: always use utf-8 when encoding for stdout/stderr
  Workaround for issue #305

Closes #305

Signed-off-by: David Aguilar <davvid@gmail.com>