I started working with Python, and here is the problem I got using pymssql on Windows:
We receive by request line with Cyrillic, we do fetch of this line. If we try to print this line to the console or save to a file, we get:
File "C:\py\lib\encodings\cp866.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_map)[0] UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-8: character maps to <undefined> If we try to apply the .encode('utf8') method to the string, then on the output we get without error, but in an incomprehensible form:
b'\xc3\x87\xc3\xa0\xc3\xa2\xc3\xae\xc3\xa4\xc3\xb1\xc3\xaa\xc3\xa0\xc3\xbf' I tried setting the connection with the MSSQL server to set the utset charset parameter utf-8 - it did not help.
In this case, everything works fine on Linux, everything is displayed without any problems. I use Python 3.4.