CVS: ht2html PDOGenerator.py,2.18,2.19
David Goodger <[email protected]> Tue, 20 Jul 2004 16:16:57 -0700
| Newsgroups | gmane.comp.web.ht2html.devel |
|---|---|
| Message-ID | <[email protected]> |
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:
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click