bmc / fortune

Python Fortune Program
http://software.clapper.org/fortune/
Apache License 2.0
69 stars 20 forks source link

Set stdout encoding to utf-8 #6

Closed sitiom closed 1 year ago

sitiom commented 2 years ago

I was getting an error of 'charmap' codec can't encode character '\u2015' in position 67: character maps to <undefined> in Windows and this fixed it.

sitiom commented 2 years ago

@bmc bump

sitiom commented 2 years ago

Workaround while this isn't merged: Enable Beta: Use Unicode UTF-8 for worldwide language support in the Control Panel \ Clock and Region \ Region \ Administrative \ Change system locale... dialog box and reboot.

image

Alternatively, you can use this reg file which does the same thing:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage]
"ACP"="65001"
"OEMCP"="65001"
"MACCP"="65001"