Thanks for catching my eye on azw files.
I've changed 466 line from
Code:
print collDesc.encode('utf-8')
to
and it worked, so i don't know if u need to convert all strings to utf-8 before print, i think calibre ensure proper encoding of metadata file.
edit.
After while i think it could be os depedent, i'm running your script at linux where utf-8 is default encoding, windows (with kernel 6.x - vista, 7, 2k8) use utf-16. Calibre force utf-8 to write metadata file? or use system encoding?