[Epydoc-commits] SF.net SVN: epydoc: [1584] trunk/epydoc/src/epydoc/docwriter/latex.py
Brought to you by:
edloper
|
From: <dva...@us...> - 2007-03-13 21:57:51
|
Revision: 1584
http://svn.sourceforge.net/epydoc/?rev=1584&view=rev
Author: dvarrazzo
Date: 2007-03-13 14:57:48 -0700 (Tue, 13 Mar 2007)
Log Message:
-----------
- Fixed encoding in LaTeX generator.
Modified Paths:
--------------
trunk/epydoc/src/epydoc/docwriter/latex.py
Modified: trunk/epydoc/src/epydoc/docwriter/latex.py
===================================================================
--- trunk/epydoc/src/epydoc/docwriter/latex.py 2007-03-11 17:28:59 UTC (rev 1583)
+++ trunk/epydoc/src/epydoc/docwriter/latex.py 2007-03-13 21:57:48 UTC (rev 1584)
@@ -118,7 +118,7 @@
self._top_section = 2
self._index_functions = 1
self._hyperref = 1
- self._encoding = kwargs.get('encoding', 'latin1')
+ self._encoding = kwargs.get('encoding', 'utf-8')
self.valdocs = sorted(docindex.reachable_valdocs(
imports=False, packages=False, bases=False, submodules=False,
subclasses=False, private=self._show_private))
@@ -180,7 +180,7 @@
log.progress(self._files_written/self._num_files, filename)
path = os.path.join(directory, filename)
- if self._encoding == 'utf8':
+ if self._encoding == 'utf-8':
f = codecs.open(path, 'w', 'utf-8')
write_func(f.write, *args)
f.close()
@@ -194,8 +194,9 @@
log.error("Output could not be represented with the "
"given encoding (%r). Unencodable characters "
"will be displayed as '?'. It is recommended "
- "that you use a different output encoding (utf8, "
- "if it's supported by latex on your system).")
+ "that you use a different output encoding (utf-8, "
+ "if it's supported by latex on your system)."
+ % self._encoding)
s = s.encode(self._encoding, 'replace')
f = open(path, 'w')
f.write(s)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|