Currently withUtf8 is not adding full utf-8 support on Windows, because we're not changing active codepage, and default one is not supporting utf-8 symbols.
so when default codepage is used, symbols are rendered as question marks.
When correct codepage is set, printing works with or without withUtf8
and when neither withCP65001 nor withUtf8 was used, there is error.
Suggestion
We can include withCP65001 to withUtf8. It makes printing user-friendly on Windows and does nothing on other systems.
Currently
withUtf8
is not adding fullutf-8
support on Windows, because we're not changing active codepage, and default one is not supporting utf-8 symbols.Steps to reprouce:
Create
a.hs
withand run it in
cmd
(my machine has Windows 10 installed). Output isso when default codepage is used, symbols are rendered as question marks. When correct codepage is set, printing works with or without
withUtf8
and when neitherwithCP65001
norwithUtf8
was used, there is error.Suggestion
We can include
withCP65001
towithUtf8
. It makes printing user-friendly on Windows and does nothing on other systems.