STINNER Victor added the comment: The example works fine on Python3:
localhost$ python3 Python 3.3.2 (default, Aug 23 2013, 19:00:04) [GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import logging >>> logging.root.addHandler(logging.FileHandler(filename='test.log',encoding='UTF16')) >>> logging.error( u'b\u0142\u0105d') >>> localhost$ hexdump test.log 0000000 feff 0062 0142 0105 0064 000a 000000c ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19267> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com