--Izn7cH1Com+I3R9J
Content-Type: multipart/mixed; boundary="wzJLGUyc3ArbnUjN"
Content-Disposition: inline


--wzJLGUyc3ArbnUjN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

Attached is a patch against Ruby 1.8.4 which cleans up the HTML output
of RDoc.  Here's a list of the changes:

* properly quote bare element attributes
* terminates dangling elements (e.g. <img>, <br>, <link>, etc)
* adds an --html-language command-line option and corresponding
  'html_lang' to specify HTML=20
  language (e.g. the lang and xml:lang attributes)
* makes image filename suffix recognition case-insensitive
* converts "CVS" to the more HTML-friendly "<acronym title=3D'Concurrent
  Versioning System'>CVS</acronym>"
* adds missing type attributes to style elements
* allows UTF-8 as a valid charset option, and switches=20
  HTML template to use %charset% and %html_lang% instead of hard-
  coded 'utf-8' and 'en', respectively
* miscellaneous small changes (> =3D> &gt;, lower-case a few element
  names for consistency, etc)



--=20
Paul Duncan <pabs / pablotron.org>        OpenPGP Key ID: 0x82C29562
http://www.pablotron.org/               http://www.paulduncan.org/

--wzJLGUyc3ArbnUjN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ruby-1.8.4-rdoc_html_cleanup.diff"
Content-Transfer-Encoding: quoted-printable

Only in ruby-1.8.4/lib/rdoc: .foo2.html.swp
diff -ur ruby-1.8.4-orig/lib/rdoc/README ruby-1.8.4/lib/rdoc/README
--- ruby-1.8.4-orig/lib/rdoc/README	2004-12-04 00:38:15.000000000 -0500
+++ ruby-1.8.4/lib/rdoc/README	2005-12-29 18:45:37.000000000 -0500
@@ -146,6 +146,11 @@
 [<tt>--help-output</tt>]
     explain the various output options.
=20
+[<tt>--html-language</tt> _language_]
+    Set the language (the lang and xml:lang attributes) for the=20
+    generated HTML.  Can be any valid RFC 1766-style language
+    string.  Defaults to 'en-US' if unspecified.
+
 [<tt>--image-format</tt> <i>gif/png/jpg/jpeg</i>]
     sets output image format for diagrams. Can be png, gif, jpeg,
     jpg. If this option is omitted, png is used. Requires --diagram.
diff -ur ruby-1.8.4-orig/lib/rdoc/generators/html_generator.rb ruby-1.8.4/l=
ib/rdoc/generators/html_generator.rb
--- ruby-1.8.4-orig/lib/rdoc/generators/html_generator.rb	2005-02-12 05:57:=
20.000000000 -0500
+++ ruby-1.8.4/lib/rdoc/generators/html_generator.rb	2005-12-29 18:14:46.00=
0000000 -0500
@@ -151,9 +151,9 @@
       end
=20
       if (type =3D=3D "http" || type =3D=3D "link") &&=20
-          url =3D~ /\.(gif|png|jpg|jpeg|bmp)$/
+          url =3D~ /\.(gif|png|jpg|jpeg|bmp)$/i
=20
-        "<img src=3D\"#{url}\">"
+        "<img src=3D\"#{url}\"/>"
       else
         "<a href=3D\"#{url}\">#{text.sub(%r{^#{type}:/*}, '')}</a>"
       end
@@ -636,6 +636,7 @@
       add_table_of_sections
=20
       @values["charset"] =3D @options.charset
+      @values['html_lang'] =3D @options.html_lang
       @values["style_url"] =3D style_url(path, @options.css)
=20
       d =3D markup(@context.comment)
@@ -804,6 +805,7 @@
       add_table_of_sections
=20
       @values["charset"]   =3D @options.charset
+      @values["html_lang"]   =3D @options.html_lang
       @values["href"]      =3D path
       @values["style_url"] =3D style_url(path, @options.css)
=20
@@ -1027,7 +1029,8 @@
           'title'     =3D> CGI.escapeHTML(index_name),
           'code'      =3D> code_body,
           'style_url' =3D> style_url(file_path, @options.css),
-          'charset'   =3D> @options.charset
+          'charset'   =3D> @options.charset,
+          'html_lang' =3D> @options.html_lang
         }
         template.write_html_on(f, values)
       end
@@ -1322,6 +1325,7 @@
         'list_title' =3D> CGI.escapeHTML(title),
         'index_url'  =3D> main_url,
         'charset'    =3D> @options.charset,
+        'html_lang'  =3D> @options.html_lang,
         'style_url'  =3D> style_url('', @options.css),
       }
=20
@@ -1341,7 +1345,8 @@
         values =3D {
           "initial_page" =3D> main_url,
           'title'        =3D> CGI.escapeHTML(@options.title),
-          'charset'      =3D> @options.charset
+          'charset'      =3D> @options.charset,
+          'html_lang'    =3D> @options.html_lang,
         }
         if @options.inline_source
           values['inline_source'] =3D true
@@ -1444,6 +1449,7 @@
     def generate_xml
       values =3D {=20
         'charset' =3D> @options.charset,
+        'html_lang' =3D> @options.html_lang,
         'files'   =3D> gen_into(@files),
         'classes' =3D> gen_into(@classes),
         'title'        =3D> CGI.escapeHTML(@options.title),
Only in ruby-1.8.4/lib/rdoc/generators/template/html: .html.rb.swp
diff -ur ruby-1.8.4-orig/lib/rdoc/generators/template/html/hefss.rb ruby-1.=
8.4/lib/rdoc/generators/template/html/hefss.rb
--- ruby-1.8.4-orig/lib/rdoc/generators/template/html/hefss.rb	2003-12-01 0=
2:12:48.000000000 -0500
+++ ruby-1.8.4/lib/rdoc/generators/template/html/hefss.rb	2005-12-29 18:00:=
35.000000000 -0500
@@ -111,10 +111,10 @@
=20
=20
 BODY =3D %{
-<html><head>
+<html lang=3D'%html_lang%' xml:lang=3D"%html_lang%'><head>
   <title>%title%</title>
   <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%chars=
et%">
-  <link rel=3DStyleSheet href=3D"%style_url%" type=3D"text/css" media=3Dsc=
reen>
+  <link rel=3D'stylesheet' href=3D"%style_url%" type=3D"text/css" media=3D=
'screen' />
   <script type=3D"text/javascript" language=3D"JavaScript">
   <!--
   function popCode(url) {
@@ -138,9 +138,9 @@
 ENDIF:description
=20
 IF:requires
-<table cellpadding=3D5 width=3D"100%">
+<table cellpadding=3D'5' width=3D"100%">
 <tr><td class=3D"tablesubtitle">Required files</td></tr>
-</table><br>
+</table><br />
 <div class=3D"name-list">
 START:requires
 HREF:aref:name:
@@ -149,9 +149,9 @@
 </div>
=20
 IF:methods
-<table cellpadding=3D5 width=3D"100%">
+<table cellpadding=3D"5" width=3D"100%">
 <tr><td class=3D"tablesubtitle">Subroutines and Functions</td></tr>
-</table><br>
+</table><br />
 <div class=3D"name-list">
 START:methods
 HREF:aref:name:,
@@ -160,10 +160,10 @@
 ENDIF:methods
=20
 IF:attributes
-<table cellpadding=3D5 width=3D"100%">
+<table cellpadding=3D"5" width=3D"100%">
 <tr><td class=3D"tablesubtitle">Arguments</td></tr>
-</table><br>
-<table cellspacing=3D5>
+</table><br />
+<table cellspacing=3D"5">
 START:attributes
      <tr valign=3D"top">
 IF:rw
@@ -180,10 +180,10 @@
 ENDIF:attributes
=20
 IF:classlist
-<table cellpadding=3D5 width=3D"100%">
+<table cellpadding=3D"5" width=3D"100%">
 <tr><td class=3D"tablesubtitle">Modules</td></tr>
-</table><br>
-%classlist%<br>
+</table><br />
+%classlist%<br />
 ENDIF:classlist
=20
   !INCLUDE!  <!-- method descriptions -->
@@ -198,8 +198,8 @@
 <table width=3D"100%">
  <tr class=3D"title-row">
  <td><table width=3D"100%"><tr>
-   <td class=3D"big-title-font" colspan=3D2><font size=3D-3><B>File</B><BR=
></font>%short_name%</td>
-   <td align=3D"right"><table cellspacing=3D0 cellpadding=3D2>
+   <td class=3D"big-title-font" colspan=3D"2"><font size=3D"-3"><b>File</b=
><br /></font>%short_name%</td>
+   <td align=3D"right"><table cellspacing=3D'0' cellpadding=3D'2'>
          <tr>
            <td  class=3D"small-title-font">Path:</td>
            <td class=3D"small-title-font">%full_path%
@@ -221,20 +221,20 @@
 ###################################################################
=20
 CLASS_PAGE =3D %{
-<table width=3D"100%" border=3D0 cellspacing=3D0>
+<table width=3D"100%" border=3D'0' cellspacing=3D'0'>
  <tr class=3D"title-row">
  <td class=3D"big-title-font">
-   <font size=3D-3><B>%classmod%</B><BR></font>%full_name%
+   <font size=3D'-3'><b>%classmod%</b><br /></font>%full_name%
  </td>
  <td align=3D"right">
-   <table cellspacing=3D0 cellpadding=3D2>
+   <table cellspacing=3D"0" cellpadding=3D"2">
      <tr valign=3D"top">
       <td class=3D"small-title-font">In:</td>
       <td class=3D"small-title-font">
 START:infiles
 HREF:full_path_url:full_path:
 IF:cvsurl
-&nbsp;(<a href=3D"%cvsurl%">CVS</a>)
+&nbsp;(<a href=3D"%cvsurl%"><acronym title=3D'Concurrent Versioning System=
'>CVS</acronym></a>)
 ENDIF:cvsurl
 END:infiles
       </td>
@@ -256,14 +256,14 @@
    </table>
   </td>
   </tr>
-</table><br>
+</table><br />
 }
=20
 ###################################################################
=20
 METHOD_LIST =3D %{
 IF:includes
-<div class=3D"tablesubsubtitle">Uses</div><br>
+<div class=3D"tablesubsubtitle">Uses</div><br />
 <div class=3D"name-list">
 START:includes
     <span class=3D"method-name">HREF:aref:name:</span>
@@ -278,7 +278,7 @@
 <tr><td class=3D"tablesubtitle">%type% %category% methods</td></tr>
 </table>
 START:methods
-<table width=3D"100%" cellspacing =3D 0 cellpadding=3D5 border=3D0>
+<table width=3D"100%" cellspacing=3D'0' cellpadding=3D'5' border=3D'0'>
 <tr><td class=3D"methodtitle">
 <a name=3D"%aref%">
 <b>%name%</b>%params%=20
@@ -304,10 +304,12 @@
 ########################## Source code ##########################
=20
 SRC_PAGE =3D %{
-<html>
+<html lang=3D'%html_lang%' xml:lang=3D'%html_lang%'>
 <head><title>%title%</title>
 <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%charset=
%">
-<style>
+<style type=3D'text/css'>
+<!--
+body { background-color: #bbb; }
   .kw { color: #3333FF; font-weight: bold }
   .cmt { color: green; font-style: italic }
   .str { color: #662222; font-style: italic }
@@ -321,9 +323,10 @@
 .ruby-operator   { color: #111111;  }
 .ruby-regexp     { color: #662222; }
 .ruby-value      { color: #662222; font-style: italic }
+-->
 </style>
 </head>
-<body bgcolor=3D"#BBBBBB">
+<body>
 <pre>%code%</pre>
 </body>
 </html>
@@ -336,10 +339,10 @@
 }
=20
 FILE_INDEX =3D %{
-<html>
+<html lang=3D'%html_lang%' xml:lang=3D'%html_lang%'>
 <head>
 <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%charset=
%">
-<style>
+<style type=3D'text/css'>
 <!--
   body {
 background-color: #bbbbbb;
@@ -368,7 +371,7 @@
 <body>
 <div class=3D"banner">%list_title%</div>
 START:entries
-<a href=3D"%href%">%name%</a><br>
+<a href=3D"%href%">%name%</a><br />
 END:entries
 </body></html>
 }
@@ -377,7 +380,7 @@
 METHOD_INDEX =3D FILE_INDEX
=20
 INDEX =3D %{
-<html>
+<html lang=3D'%html_lang%' xml:lang=3D'%html_lang%'>
 <head>
   <title>%title%</title>
   <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%chars=
et%">
diff -ur ruby-1.8.4-orig/lib/rdoc/generators/template/html/html.rb ruby-1.8=
=2E4/lib/rdoc/generators/template/html/html.rb
--- ruby-1.8.4-orig/lib/rdoc/generators/template/html/html.rb	2004-12-11 20=
:37:24.000000000 -0500
+++ ruby-1.8.4/lib/rdoc/generators/template/html/html.rb	2005-12-29 18:02:1=
5.000000000 -0500
@@ -246,7 +246,7 @@
 }
=20
 HEADER =3D XHTML_PREAMBLE + %{
-<html xmlns=3D"http://www.w3.org/1999/xhtml" xml:lang=3D"en" lang=3D"en">
+<html xmlns=3D"http://www.w3.org/1999/xhtml" xml:lang=3D"%html_lang%" lang=
=3D"%html_lang%">
 <head>
   <title>%title%</title>
   <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%chars=
et%" />
@@ -358,7 +358,7 @@
                 </a>
 ENDIF:full_path_url
 IF:cvsurl
-        &nbsp;(<a href=3D"%cvsurl%">CVS</a>)
+        &nbsp;(<a href=3D"%cvsurl%"><acronym title=3D'Concurrent Versionin=
g System'>CVS</acronym></a>)
 ENDIF:cvsurl
         <br />
 END:infiles
@@ -504,7 +504,7 @@
 START:aliases
         <tr class=3D"top-aligned-row context-row">
           <td class=3D"context-item-name">%old_name%</td>
-          <td>-></td>
+          <td>-&gt;</td>
           <td class=3D"context-item-value">%new_name%</td>
         </tr>
 IF:desc
@@ -627,7 +627,7 @@
 #####################################################################
=20
 SRC_PAGE =3D XHTML_PREAMBLE + %{
-<html>
+<html lang=3D"%html_lang%" xml:lang=3D"%html_lang%">
 <head>
   <title>%title%</title>
   <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%chars=
et%" />
@@ -654,7 +654,7 @@
     %list_title%
=20
   -->
-<html xmlns=3D"http://www.w3.org/1999/xhtml" xml:lang=3D"en" lang=3D"en">
+<html xmlns=3D"http://www.w3.org/1999/xhtml" lang=3D"%html_lang%" xml:lang=
=3D"%html_lang%">
 <head>
   <title>%list_title%</title>
   <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%chars=
et%" />
@@ -687,7 +687,7 @@
     %title%
=20
   -->
-<html xmlns=3D"http://www.w3.org/1999/xhtml" xml:lang=3D"en" lang=3D"en">
+<html xmlns=3D"http://www.w3.org/1999/xhtml" lang=3D"%html_lang%" xml:lang=
=3D"%html_lang%">
 <head>
   <title>%title%</title>
   <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%chars=
et%" />
diff -ur ruby-1.8.4-orig/lib/rdoc/generators/template/html/kilmer.rb ruby-1=
=2E8.4/lib/rdoc/generators/template/html/kilmer.rb
--- ruby-1.8.4-orig/lib/rdoc/generators/template/html/kilmer.rb	2004-12-28 =
21:15:52.000000000 -0500
+++ ruby-1.8.4/lib/rdoc/generators/template/html/kilmer.rb	2005-12-29 18:02=
:57.000000000 -0500
@@ -91,10 +91,10 @@
=20
=20
 BODY =3D %{
-<html><head>
+<html lang=3D"%html_lang%" xml:lang=3D"%html_lang%"><head>
   <title>%title%</title>
   <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%chars=
et%">
-  <link rel=3DStyleSheet href=3D"%style_url%" type=3D"text/css" media=3Dsc=
reen>
+  <link rel=3D'stylesheet' href=3D"%style_url%" type=3D"text/css" media=3D=
'screen' />
   <script type=3D"text/javascript" language=3D"JavaScript">
   <!--
   function popCode(url) {
@@ -118,9 +118,9 @@
 ENDIF:description
=20
 IF:requires
-<table cellpadding=3D5 width=3D"100%">
+<table cellpadding=3D'5' width=3D"100%">
 <tr><td class=3D"tablesubtitle">Required files</td></tr>
-</table><br>
+</table><br />
 <div class=3D"name-list">
 START:requires
 HREF:aref:name:
@@ -129,7 +129,7 @@
 </div>
=20
 IF:methods
-<table cellpadding=3D5 width=3D"100%">
+<table cellpadding=3D"5" width=3D"100%">
 <tr><td class=3D"tablesubtitle">Methods</td></tr>
 </table><br>
 <div class=3D"name-list">
@@ -152,10 +152,10 @@
 ENDIF:sectitle
=20
 IF:attributes
-<table cellpadding=3D5 width=3D"100%">
+<table cellpadding=3D"5" width=3D"100%">
 <tr><td class=3D"tablesubtitle">Attributes</td></tr>
-</table><br>
-<table cellspacing=3D5>
+</table><br />
+<table cellspacing=3D"5">
 START:attributes
      <tr valign=3D"top">
 IF:rw
@@ -172,10 +172,10 @@
 ENDIF:attributes
=20
 IF:classlist
-<table cellpadding=3D5 width=3D"100%">
+<table cellpadding=3D"5" width=3D"100%">
 <tr><td class=3D"tablesubtitle">Classes and Modules</td></tr>
-</table><br>
-%classlist%<br>
+</table><br />
+%classlist%<br />
 ENDIF:classlist
=20
   !INCLUDE!  <!-- method descriptions -->
@@ -192,13 +192,13 @@
 <table width=3D"100%">
  <tr class=3D"title-row">
  <td><table width=3D"100%"><tr>
-   <td class=3D"big-title-font" colspan=3D2><font size=3D-3><B>File</B><BR=
></font>%short_name%</td>
-   <td align=3D"right"><table cellspacing=3D0 cellpadding=3D2>
+   <td class=3D"big-title-font" colspan=3D'2'><font size=3D-3><b>File</b><=
br /></font>%short_name%</td>
+   <td align=3D"right"><table cellspacing=3D"0" cellpadding=3D"2">
          <tr>
            <td  class=3D"small-title-font">Path:</td>
            <td class=3D"small-title-font">%full_path%
 IF:cvsurl
-				&nbsp;(<a href=3D"%cvsurl%">CVS</a>)
+				&nbsp;(<a href=3D"%cvsurl%"><acronym title=3D'Concurrent Versioning Sy=
stem'>CVS</acronym></a>)
 ENDIF:cvsurl
            </td>
          </tr>
@@ -209,26 +209,26 @@
         </table>
     </td></tr></table></td>
   </tr>
-</table><br>
+</table><br />
 _FILE_PAGE_
=20
 ###################################################################
=20
 CLASS_PAGE =3D %{
-<table width=3D"100%" border=3D0 cellspacing=3D0>
+<table width=3D"100%" border=3D"0" cellspacing=3D"0">
  <tr class=3D"title-row">
  <td class=3D"big-title-font">
-   <font size=3D-3><B>%classmod%</B><BR></font>%full_name%
+   <font size=3D"-3"><b>%classmod%</b><br /></font>%full_name%
  </td>
  <td align=3D"right">
-   <table cellspacing=3D0 cellpadding=3D2>
+   <table cellspacing=3D"0" cellpadding=3D"2">
      <tr valign=3D"top">
       <td class=3D"small-title-font">In:</td>
       <td class=3D"small-title-font">
 START:infiles
 HREF:full_path_url:full_path:
 IF:cvsurl
-&nbsp;(<a href=3D"%cvsurl%">CVS</a>)
+&nbsp;(<a href=3D"%cvsurl%"><acronym title=3D'Concurrent Versioning System=
'>CVS</acronym></a>)
 ENDIF:cvsurl
 END:infiles
       </td>
@@ -250,14 +250,14 @@
    </table>
   </td>
   </tr>
-</table><br>
+</table><br />
 }
=20
 ###################################################################
=20
 METHOD_LIST =3D %{
 IF:includes
-<div class=3D"tablesubsubtitle">Included modules</div><br>
+<div class=3D"tablesubsubtitle">Included modules</div><br />
 <div class=3D"name-list">
 START:includes
     <span class=3D"method-name">HREF:aref:name:</span>
@@ -272,7 +272,7 @@
 <tr><td class=3D"tablesubtitle">%type% %category% methods</td></tr>
 </table>
 START:methods
-<table width=3D"100%" cellspacing =3D 0 cellpadding=3D5 border=3D0>
+<table width=3D"100%" cellspacing=3D"0" cellpadding=3D"5" border=3D"0">
 <tr><td class=3D"methodtitle">
 <a name=3D"%aref%">
 IF:callseq
@@ -316,10 +316,11 @@
 ########################## Source code ##########################
=20
 SRC_PAGE =3D %{
-<html>
+<html lang=3D"%html_lang%" xml:lang=3D"%html_lang%">
 <head><title>%title%</title>
 <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%charset=
%">
-<style>
+<style type=3D'text/css'>
+body { background-color: #fff; }
 .ruby-comment    { color: green; font-style: italic }
 .ruby-constant   { color: #4433aa; font-weight: bold; }
 .ruby-identifier { color: #222222;  }
@@ -335,7 +336,7 @@
   .re  { color: #662222; }
 </style>
 </head>
-<body bgcolor=3D"white">
+<body>
 <pre>%code%</pre>
 </body>
 </html>
@@ -348,7 +349,7 @@
 }
=20
 FILE_INDEX =3D %{
-<html>
+<html lang=3D"%html_lang%" xml:lang=3D"%html_lang%">
 <head>
 <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%charset=
%">
 <style>
@@ -389,7 +390,7 @@
 METHOD_INDEX =3D FILE_INDEX
=20
 INDEX =3D %{
-<html>
+<html lang=3D"%html_lang%" xml:lang=3D"%html_lang%">
 <head>
   <title>%title%</title>
   <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%chars=
et%">
diff -ur ruby-1.8.4-orig/lib/rdoc/generators/template/html/old_html.rb ruby=
-1.8.4/lib/rdoc/generators/template/html/old_html.rb
--- ruby-1.8.4-orig/lib/rdoc/generators/template/html/old_html.rb	2004-05-2=
3 21:48:37.000000000 -0400
+++ ruby-1.8.4/lib/rdoc/generators/template/html/old_html.rb	2005-12-29 18:=
04:28.000000000 -0500
@@ -297,10 +297,10 @@
=20
=20
 HEADER =3D %{
-<?xml version=3D"1.0" encoding=3D"utf-8"?>
+<?xml version=3D"1.0" encoding=3D"%charset%"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns=3D"http://www.w3.org/1999/xhtml" xml:lang=3D"en" lang=3D"en">
+<html xmlns=3D"http://www.w3.org/1999/xhtml" lang=3D"%html_lang%" xml:lang=
=3D"%html_lang%">
 <head>
   <title>%title%</title>
   <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%chars=
et%" />
@@ -566,7 +566,7 @@
=20
 SRC_PAGE =3D %{
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
+<html lang=3D"%html_lang%" xml:lang=3D"%html_lang%">
 <head>
 <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%charset=
%">
 <title>%title%</title>
@@ -586,7 +586,7 @@
=20
 FILE_INDEX =3D %{
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
+<html lang=3D"%html_lang%" xml:lang=3D"%html_lang%">
 <head>
 <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%charset=
%">
 <title>%list_title%</title>
@@ -630,7 +630,7 @@
=20
 INDEX =3D %{
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
-<html>
+<html lang=3D"%html_lang%" xml:lang=3D"%html_lang%">
 <head>
 <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%charset=
%">
 <title>%title%</title></head>
diff -ur ruby-1.8.4-orig/lib/rdoc/generators/template/html/one_page_html.rb=
 ruby-1.8.4/lib/rdoc/generators/template/html/one_page_html.rb
--- ruby-1.8.4-orig/lib/rdoc/generators/template/html/one_page_html.rb	2004=
-03-24 12:01:11.000000000 -0500
+++ ruby-1.8.4/lib/rdoc/generators/template/html/one_page_html.rb	2005-12-2=
9 18:04:34.000000000 -0500
@@ -79,7 +79,7 @@
=20
 ONE_PAGE =3D %{
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
+<html lang=3D"%html_lang%" xml:lang=3D"%html_lang%">
 <head>
   <title>%title%</title>
   <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D%chars=
et%" />
diff -ur ruby-1.8.4-orig/lib/rdoc/generators/xml_generator.rb ruby-1.8.4/li=
b/rdoc/generators/xml_generator.rb
--- ruby-1.8.4-orig/lib/rdoc/generators/xml_generator.rb	2003-12-01 02:12:4=
8.000000000 -0500
+++ ruby-1.8.4/lib/rdoc/generators/xml_generator.rb	2005-12-29 18:05:09.000=
000000 -0500
@@ -71,9 +71,10 @@
     #
     def generate_xml
       values =3D {=20
-        'charset' =3D> @options.charset,
-        'files'   =3D> gen_into(@files),
-        'classes' =3D> gen_into(@classes)
+        'charset'   =3D> @options.charset,
+        'html_lang' =3D> @options.html_lang,
+        'files'     =3D> gen_into(@files),
+        'classes'   =3D> gen_into(@classes)
       }
      =20
       # this method is defined in the template file
diff -ur ruby-1.8.4-orig/lib/rdoc/options.rb ruby-1.8.4/lib/rdoc/options.rb
--- ruby-1.8.4-orig/lib/rdoc/options.rb	2004-11-20 10:02:56.000000000 -0500
+++ ruby-1.8.4/lib/rdoc/options.rb	2005-12-29 18:47:19.000000000 -0500
@@ -65,6 +65,9 @@
   # character-set
   attr_reader :charset
=20
+  # html language
+  attr_reader :html_lang
+
   # should source code be included inline, or displayed in a popup
   attr_reader :inline_source
=20
@@ -157,6 +160,11 @@
         "Show method source code inline, rather\n" +
         "than via a popup link" ],
=20
+      [ "--html-language", "-L",   'lang',
+        "Set the HTML language.  Can be any RFC 1766\n" +
+        "format string.  Defaults to 'en-US' if\n" +
+        "unspecified." ],
+
       [ "--line-numbers", "-N", nil,
         "Include line numbers in the source code" ],
=20
@@ -363,6 +371,7 @@
       @include_line_numbers =3D false
       @extra_accessor_flags =3D {}
       @promiscuous =3D false
+      @html_lang =3D 'en-US'
=20
       @css =3D nil
       @webcvs =3D nil
@@ -372,6 +381,8 @@
                    'Shift_JIS'
                  when /^E/i
                    'EUC-JP'
+                 when /^UTF/i
+                   'UTF-8'
                  else
                    'iso-8859-1'
                  end
@@ -387,6 +398,7 @@
         when "--charset"       then @charset       =3D arg
         when "--debug"         then $DEBUG         =3D true
         when "--exclude"       then @exclude       << Regexp.new(arg)
+        when "--html-language" then @html_lang     =3D arg
         when "--inline-source" then @inline_source =3D true
         when "--line-numbers"  then @include_line_numbers =3D true
         when "--main"          then @main_page     =3D arg

--wzJLGUyc3ArbnUjN--

--Izn7cH1Com+I3R9J
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFDtHo8zdlT34LClWIRAkcMAKClh9v+xgVm+ounVa/ZOL1joZ4vAQCdE+y5
DqEUEWPPMeZMCs+F+JXd5Gg=
=ofF5
-----END PGP SIGNATURE-----

--Izn7cH1Com+I3R9J--