Unicode & mi.set_user_metadata('#customxxx', custcol)
Class Metadata in src>calibre>ebooks>metadata>book>base.py has nothing special regarding utf-8 encoding of new values for custom columns updated via custcol['#value#'] = u_xxxxxx and then mi.set_user_metadata('#customxxx', custcol). My dictionary used for updating custcol['#value#'] = u_xxxxxx is pure utf-8. However, after updating, the gui shows everything as utf-8 literals instead of the equivalent of what would be displayed if it were to be printed. Example: u_xxxxxx might be u'N\xe3o-fic\xe7\xe3o' , which should appear to the user in the gui as Não-ficção. Instead, it appears to the user as u'N\xe3o-fic\xe7\xe3o' . Is there any special encoding or method() or other syntax required for custcol['#value#'] = u_xxxxxx in order to force mi.set_user_metadata to update itself in a manner suitable for display?
Thanks in advance for your help.
|