# HG changeset patch # User Oleksandr Gavenko # Date 1463345144 -10800 # Node ID 6eb9d9e1067af096329d711bc52aeefe5b1fe3c8 # Parent 913f2f1c511dd0b836b237f7ad63ebcdf4deca8f Fix error under Cygwin Python: File "/usr/lib/python3.4/encodings/cp1251.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-1: character maps to diff -r 913f2f1c511d -r 6eb9d9e1067a py/gadict_c5.py --- a/py/gadict_c5.py Sun May 15 09:26:03 2016 +0300 +++ b/py/gadict_c5.py Sun May 15 23:45:44 2016 +0300 @@ -3,6 +3,7 @@ import io import sys +import codecs import gadict @@ -48,7 +49,7 @@ if FONAME is None: FOUT = sys.stdout else: - FOUT = open(FONAME, "w") + FOUT = codecs.open(FONAME, "w", "utf-8") if PRELUDE.name is not None: FOUT.write("Dictionary name: ")