ID3v1 cannot reliably include any non-ASCII character. You can write cp1251-encoded bytes into ID3v1 tags but they will only render as Cyrillic on Russian-locale OS installs and even then not on all applications.
EyeD3 deals with Unicode strings internally and arbitrarily chooses to use latin1
(aka ISO-8859-1) as the encoding for ID3v1 tags. This probably isn't a good choice because latin1
is never the default locale-specific encoding on a Windows box (for Western Europe it's actually cp1252
which is similar but not the same).
However a property of this choice of encoding is that each byte in it maps to a Unicode character with the same code point number. You can take advantage of this by making a Unicode string that contains characters that, when encoded as latin1
, will end up being the byte encoding of a chosen string in an encoding other than latin1
.
album_name = u'Жить в твоей голове'
mangled_name = album_name.encode('cp1251').decode('latin1')
tag.setAlbum(mangled_name) # will encode as latin1, resulting in cp1251 bytes
This is a horrible hack, of doubtful benefit, and one of the reasons you should avoid ID3v1.