From: David G. <go...@us...> - 2004-07-20 23:17:06
|
Update of /cvsroot/ht2html/ht2html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27545 Modified Files: PDOGenerator.py Log Message: simplified glue code (for new Docutils API); needs Docutils 0.3.3+ (and Python 2.3 for non-Latin-1 output) Index: PDOGenerator.py =================================================================== RCS file: /cvsroot/ht2html/ht2html/PDOGenerator.py,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -d -r2.18 -r2.19 *** PDOGenerator.py 8 Apr 2004 05:43:55 -0000 2.18 --- PDOGenerator.py 20 Jul 2004 23:16:55 -0000 2.19 *************** *** 106,109 **** --- 106,112 ---- return self.__parser.get('content-type') + def get_encoding(self): + return self.__parser.get('encoding', 'latin-1') + def get_sidebar(self): if self.__parser.get('wide-page', 'no').lower() == 'yes': *************** *** 157,161 **** def __grokbody(self): if self.__body is None: ! text = self.__parser.fp.read() if self.get_content_type() == 'text/x-rst': if rst_html is None: --- 160,165 ---- def __grokbody(self): if self.__body is None: ! data = self.__parser.fp.read() ! text = data.decode(self.get_encoding()) if self.get_content_type() == 'text/x-rst': if rst_html is None: |