1 2 3
#! -*- coding: koi8-r -*- assert u"ðÉÔÏÎ".encode("utf-8") == '\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd' assert u"\ð".encode("utf-8") == '\\\xd0\x9f'