Bug #2330
Feature #551: Lexicon support: Liddell and Scott (Middle)
LSJ cannot be exported to an epub
100%
Associated revisions
Changing TOC nodes to use Django templates since Genshi fails to handle
Unicode correctly
Reference #2330
Changing TOC nodes to use Django templates since Genshi fails to handle
Unicode correctly
Reference #2330
Migrating away from Genshi templates for epub generation
Reference #2330
Migrating away from Genshi templates for epub generation
Reference #2330
Migrating away from Genshi templates for epub generation
Reference #2330
Migrating away from Genshi templates for epub generation
Reference #2330
Migrating away from Genshi templates for epub generation
Reference #2330
Migrating away from Genshi templates for epub generation
Reference #2330
Migrating away from Genshi templates for epub generation
Reference #2330
Migrating away from Genshi templates for epub generation
Reference #2330
Finalizing changes to move away from Genshi templates for ebooks
Reference #2330
Finalizing changes to move away from Genshi templates for ebooks
Reference #2330
History
#1 Updated by Luke Murphey about 6 years ago
The TOC cannot be generated because it seems to require ascii.
Might want to consider:#2 Updated by Luke Murphey about 6 years ago
Example of what is happening here:
s = 'main \xe1\xbc\x80\xe1\xbd\xb1\xce\xb1\xcf\x84\xce\xbf\xcf\x82' s.decode('utf-8') s.decode('utf-8').encode('ascii', 'ignore')
#3 Updated by Luke Murphey about 6 years ago
Trace:
- textcritical_net/src/epub.py: self.__writeTocNCX()
- textcritical_net/src/epub.py: fout.write(stream.render('xml'))
The error is generated from:
<navLabel><text>${node.title}</text></navLabel>
Similar to: https://genshi.edgewall.org/ticket/542
#4 Updated by Luke Murphey about 6 years ago
Observations:
- title is an instance of str with utf-8 encoding
- The following does not work:
- title.decode("utf-8")
- title
- unicode(title)
- unicode(title.decode("utf-8"))
- The following generates no errors but the content is wrong:
- title.decode("utf-8").encode("ascii", "ignore")
- title.decode("utf-8").encode("windows-1252", "ignore")
- title = Greek.unicode_to_beta_code(unicode(title.decode("utf-8")))
#5 Updated by Luke Murphey about 6 years ago
- Why do the main content pages not fail?
- Genshi is not being imported for that rendering
- Would using Django templates work?
- Could likely use http://jinja.pocoo.org/
#6 Updated by Luke Murphey about 6 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100