Attached to this is a screen snippet of the output of the following code in my ui.py:
id_map = {}
for book, genre in book_new_genre_final.items():
#print("book, genre : ", book, genre)
mi = Metadata(_('Unknown'))
u_book = book #still in utf8
u_genre = genre #still in utf8
n_book = int(u_book)
if isinstance(u_genre, bytes):
print("u_genre is bytes")
else:
if isinstance(u_genre, unicode):
print("u_genre is utf8")
else:
print("u_genre is something else...")
if n_book > 0 and u_genre > ' ':
All of the output said "u_genre is utf8".
Please look at the screen snippet from metadata.db, which is also attached. Note the complex characters that only unicode can support, such as German umlauts and the Portuguese word.
Last edited by DaltonST; 07-23-2014 at 10:46 AM.
Reason: Changed code to show latest version
|