diff -x '*~' -x '*.py[co]' -ur epydoc.orig/src/epydoc/cli.py epydoc/src/epydoc/cli.py --- epydoc.orig/src/epydoc/cli.py 2004-02-09 17:56:07.000000000 -0300 +++ epydoc/src/epydoc/cli.py 2005-05-13 18:06:05.000000000 -0300 @@ -30,6 +30,7 @@ -c SHEET, --css SHEET CSS stylesheet for HTML files. --private-css SHEET CSS stylesheet for private objects. --inheritance STYLE The format for showing inherited objects. + --encoding ENCODING The encoding of the HTML files. -V, --version Print the version of epydoc. -h, -?, --help, --usage Display this usage message. -h TOPIC, --help TOPIC Display information about TOPIC (docformat, @@ -262,7 +263,7 @@ C{target}, C{modules}, C{verbosity}, C{prj_name}, C{output}, C{show_imports}, C{frames}, C{private}, C{debug}, C{top}, C{list_classes_separately}, C{docformat}, C{inheritance}, - C{autogen_vars}, and C{test}. + C{encoding}, C{autogen_vars}, and C{test}. @rtype: C{None} """ # Default values. @@ -271,6 +272,7 @@ 'show_imports':0, 'frames':1, 'private':None, 'list_classes_separately': 0, 'debug':0, 'docformat':None, 'top':None, 'inheritance': None, + 'encoding': 'iso-8859-1', 'ignore_param_mismatch': 0, 'alphabetical': 1} # Get the command-line arguments, using getopts. @@ -286,7 +288,7 @@ 'target= version verbose '+ 'navlink= nav_link= nav-link= '+ 'command-line-order command_line_order '+ - 'inheritance= inheritence= '+ + 'inheritance= inheritence= encoding= '+ 'ignore_param_mismatch ignore-param-mismatch '+ 'test= tests= checks=').split() try: @@ -321,6 +323,8 @@ options['ignore_param_mismatch'] = 1 elif opt in ('--inheritance', '--inheritence'): options['inheritance']=val.lower() + elif opt in ('--encoding',): + options['encoding']=val elif opt in ('--latex',): options['action']='latex' elif opt in ('--name', '-n'): options['prj_name']=val elif opt in ('--navlink', '--nav-link', '--nav_link'): diff -x '*~' -x '*.py[co]' -ur epydoc.orig/src/epydoc/html.py epydoc/src/epydoc/html.py --- epydoc.orig/src/epydoc/html.py 2005-01-12 12:22:30.000000000 -0300 +++ epydoc/src/epydoc/html.py 2005-05-13 18:06:20.000000000 -0300 @@ -68,7 +68,7 @@ ################################################## # Expects: name -HEADER = ''' +HEADER = ''' @@ -101,7 +101,7 @@ ''' # Expects: (name, mainFrame_src) -FRAMES_INDEX = ''' +FRAMES_INDEX = ''' @@ -118,7 +118,7 @@ ''' # Expects (url, url, name) -REDIRECT_INDEX = ''' +REDIRECT_INDEX = ''' @@ -361,6 +361,9 @@ end of their group; if C{inheritance='included'}, then inherited objects are mixed in with non-inherited objects. The default is 'grouped'. + @type encoding: C{string} + @keyword encoding: The encoding of the output. The default is + 'iso-8859-1'. """ self._docmap = docmap @@ -384,6 +387,7 @@ self._variable_tooltip_linelen = \ kwargs.get('variable_tooltip_linelength', 600) self._inheritance = kwargs.get('inheritance', 'grouped') + self._encoding = kwargs.get('encoding', 'iso-8859-1') # Create the project homepage link, if it was not specified. if (self._prj_name or self._prj_url) and not self._prj_link: @@ -651,7 +655,7 @@ # Use a redirect if top is external, or if we faild to copy. name = self._prj_name or 'this project' - open(filename, 'w').write(REDIRECT_INDEX % (top, top, name)) + open(filename, 'w').write(REDIRECT_INDEX % (self._encoding, top, top, name)) def _write_css(self, directory, cssname): """ @@ -993,7 +997,7 @@ @param private: The output stream for the private version of the page. """ prj_name = self._prj_name or "API Documentation" - str = FRAMES_INDEX % (prj_name, self._top_page) + str = FRAMES_INDEX % (self._encoding, prj_name, self._top_page) public.write(str); private.write(str) def _write_toc(self, public, private): @@ -3043,7 +3047,7 @@ name. @rtype: C{string} """ - return HEADER % name + return HEADER % (self._encoding, name) def _footer(self): """