Problem with unicode in oaipmh
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Silva OAI |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I stumbled over a unicode problem in the oaipmh.client module.
The OAI PMH repository I'd like to harvest returns setNames containing unicodes when I request their ListSets (requestUrl?
To work around this problem, the _ElementUnicode
The following code can achieve this:
In oaipmh.
==
setSpec = e('string(
setName = u'%s' %e('string(
==
May be there's a better solution.
Can you fix the problem and prepare a new release?
Benno
Changed in silva-oai: | |
status: | New → Fix Released |
The clean solution, of course, is the following: _ElementUnicode Result objects. e('string( oai:setSpec/ text()) ')) e('string( oai:setName/ text()) '))
==
# make sure we get back unicode strings instead
# of lxml.etree.
setSpec = unicode(
setName = unicode(
==
I have fixed that bug in client.py and made a check in (r44465).
Benno