This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author shamilbi
Recipients shamilbi, vinay.sajip
Date 2009-02-08.13:36:19
SpamBayes Score 1.01837e-06
Marked as misclassified No
Message-id <>
#! -*- coding: windows-1251 -*-

import logging

logger = logging.getLogger('test_log')
logger.addHandler(logging.FileHandler('test.log', encoding='cp1251'))

logger.debug(u'Привет')    # russian Hello

Traceback (most recent call last):
  File "e:\bin\python\0\lib\logging\", line 765, in emit % msg.encode("UTF-8"))
  File "e:\bin\python\0\lib\", line 686, in write
    return self.writer.write(data)
  File "e:\bin\python\0\lib\", line 351, in write
    data, consumed = self.encode(object, self.errors)
  File "e:\bin\python\0\lib\encodings\", line 12, in encode
    return codecs.charmap_encode(input,errors,encoding_table)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0:
ordinal not in range(128)
Date User Action Args
2009-02-08 13:36:24shamilbisetrecipients: + shamilbi, vinay.sajip
2009-02-08 13:36:23shamilbisetmessageid: <>
2009-02-08 13:36:22shamilbilinkissue5170 messages
2009-02-08 13:36:21shamilbicreate