unicode

1
2
unicode('ыпав','utf8').encode('cp1251')
s.decode('utf8').encode('cp1251')