From 7020ce507edcf494d141697a1734081e6994c69b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 17 Oct 2010 08:14:12 -0600 Subject: [PATCH] Fix #7198 (EPUB issue- Incorrect format for language in toc.ncx) --- src/calibre/ebooks/oeb/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index e85098e293..2d2945c26a 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -1908,6 +1908,7 @@ class OEBBook(object): def _to_ncx(self): lang = unicode(self.metadata.language[0]) + lang = lang.replace('_', '-') ncx = etree.Element(NCX('ncx'), attrib={'version': '2005-1', XML('lang'): lang}, nsmap={None: NCX_NS})