Project

General

Profile

Bug #2330

Feature #551: Lexicon support: Liddell and Scott (Middle)

LSJ cannot be exported to an epub

Added by Luke Murphey about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
11/20/2018
Due date:
% Done:

100%

Associated revisions

Revision 890 (diff)
Added by lukemurphey about 6 years ago

Changing TOC nodes to use Django templates since Genshi fails to handle
Unicode correctly

Reference #2330

Revision 928 (diff)
Added by lukemurphey about 6 years ago

Changing TOC nodes to use Django templates since Genshi fails to handle
Unicode correctly

Reference #2330

Revision 892 (diff)
Added by lukemurphey about 6 years ago

Migrating away from Genshi templates for epub generation

Reference #2330

Revision 930 (diff)
Added by lukemurphey about 6 years ago

Migrating away from Genshi templates for epub generation

Reference #2330

Revision 893 (diff)
Added by lukemurphey about 6 years ago

Migrating away from Genshi templates for epub generation

Reference #2330

Revision 931 (diff)
Added by lukemurphey about 6 years ago

Migrating away from Genshi templates for epub generation

Reference #2330

Revision 894 (diff)
Added by lukemurphey about 6 years ago

Migrating away from Genshi templates for epub generation

Reference #2330

Revision 932 (diff)
Added by lukemurphey about 6 years ago

Migrating away from Genshi templates for epub generation

Reference #2330

Revision 895 (diff)
Added by lukemurphey about 6 years ago

Migrating away from Genshi templates for epub generation

Reference #2330

Revision 933 (diff)
Added by lukemurphey about 6 years ago

Migrating away from Genshi templates for epub generation

Reference #2330

Revision 896 (diff)
Added by lukemurphey about 6 years ago

Finalizing changes to move away from Genshi templates for ebooks

Reference #2330

Revision 934 (diff)
Added by lukemurphey about 6 years ago

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:

  1. title is an instance of str with utf-8 encoding
  2. The following does not work:
    1. title.decode("utf-8")
    2. title
    3. unicode(title)
    4. unicode(title.decode("utf-8"))
  3. The following generates no errors but the content is wrong:
    1. title.decode("utf-8").encode("ascii", "ignore")
    2. title.decode("utf-8").encode("windows-1252", "ignore")
    3. title = Greek.unicode_to_beta_code(unicode(title.decode("utf-8")))

#5 Updated by Luke Murphey about 6 years ago

Questions:
  • Why do the main content pages not fail?
    • Genshi is not being imported for that rendering
  • Would using Django templates work?

#6 Updated by Luke Murphey about 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF