This repository was archived by the owner on Feb 4, 2020. It is now read-only.

Description
Hello. I have simple data collected from YAZ commands.
yaz-client -m catalogue.dat
I am connecting to library which has MARC21 format and UTF-8 encoding.
I am saving records to catalogue.dat file. It's CZECH library so titles are with special characters for example Ř or Ě etc. when i will run this code:
def get_books(request):
with open('catalogue.dat', 'rb') as fh:
reader = MARCReader(fh)
for record in reader:
print(str(record.title()))
return HttpResponseRedirect('/')
Console will print this:
couldn't find 0xbe in g0=66 g1=69
Zelen©Ł kniha /
couldn't find 0xbe in g0=66 g1=69
Kniha p¿©Łtel /
Kniha ¿©Ưkadel /
Kniha poezie /
Kniha dn©Ư /
Kniha ¿©Ưkadel /
Kniha definic /
Kniha cest /
Kniha Frenesis /
Smoln©Ł kniha /
couldn't find 0xbe in g0=66 g1=69
couldn't find 0xbe in g0=66 g1=69
couldn't find 0xbe in g0=66 g1=69
couldn't find 0xaf in g0=66 g1=69
So basicly there are two issues. First why it prints couldn't find errors and why it prints data without that special characters? Thank you so much.