Fossil SCM
Handle eventual utf-8 correctly everywhere in download page
Commit
63565631d7030c87a6cbfbd7c3309368f75625a9
Parent
3d50bdcb9a9e5bc…
1 file changed
+10
-5
+10
-5
| --- www/mkdownload.tcl | ||
| +++ www/mkdownload.tcl | ||
| @@ -3,10 +3,11 @@ | ||
| 3 | 3 | # Run this script to build the "download.html" page. Also generate |
| 4 | 4 | # the fossil_download_checksums.html page. |
| 5 | 5 | # |
| 6 | 6 | # |
| 7 | 7 | set out [open download.html w] |
| 8 | +fconfigure $out -encoding utf-8 -translation lf | |
| 8 | 9 | puts $out \ |
| 9 | 10 | {<!DOCTYPE html><html> |
| 10 | 11 | <head> |
| 11 | 12 | <base href="http://www.fossil-scm.org/" /> |
| 12 | 13 | <title>Fossil: Timeline</title> |
| @@ -33,13 +34,15 @@ | ||
| 33 | 34 | <a href='/fossil/reportlist'>Tickets</a> |
| 34 | 35 | </div> |
| 35 | 36 | <div class="content"> |
| 36 | 37 | <p> |
| 37 | 38 | |
| 38 | -<center><font size=4> | |
| 39 | -<b>To install Fossil →</b> download the stand-alone executable | |
| 40 | -and put it on your $PATH. | |
| 39 | +<center><font size=4>} | |
| 40 | +puts $out \ | |
| 41 | +"<b>To install Fossil \u2192</b> download the stand-alone executable" | |
| 42 | +puts $out \ | |
| 43 | +{and put it on your $PATH. | |
| 41 | 44 | </font><p><small> |
| 42 | 45 | RPMs available |
| 43 | 46 | <a href="http://download.opensuse.org/repositories/home:/rmax:/fossil/"> |
| 44 | 47 | here.</a> |
| 45 | 48 | Cryptographic checksums for download files are |
| @@ -65,11 +68,11 @@ | ||
| 65 | 68 | set dt [string range $datetime 0 3]-[string range $datetime 4 5]- |
| 66 | 69 | append dt "[string range $datetime 6 7] " |
| 67 | 70 | append dt "[string range $datetime 8 9]:[string range $datetime 10 11]:" |
| 68 | 71 | append dt "[string range $datetime 12 13]" |
| 69 | 72 | set link [string map {{ } +} $dt] |
| 70 | - set hr http://www.fossil-scm.org/fossil/timeline?c=$link&y=ci | |
| 73 | + set hr http://www.fossil-scm.org/fossil/timeline?c=$link&y=ci | |
| 71 | 74 | puts $out "<tr><td colspan=6 align=left><hr>" |
| 72 | 75 | puts $out "<center><b><a href=\"$hr\">$dt</a></b></center>" |
| 73 | 76 | puts $out "</td></tr>" |
| 74 | 77 | |
| 75 | 78 | foreach {prefix suffix img desc} { |
| @@ -99,10 +102,11 @@ | ||
| 99 | 102 | } |
| 100 | 103 | puts $out "</tr>" |
| 101 | 104 | if {[file exists download/releasenotes-$datetime.html]} { |
| 102 | 105 | puts $out "<tr><td colspan=6 align=left>" |
| 103 | 106 | set rn [open download/releasenotes-$datetime.html] |
| 107 | + fconfigure $rn -encoding utf-8 | |
| 104 | 108 | puts $out "[read $rn]" |
| 105 | 109 | close $rn |
| 106 | 110 | puts $out "</td></tr>" |
| 107 | 111 | } |
| 108 | 112 | } |
| @@ -116,10 +120,11 @@ | ||
| 116 | 120 | close $out |
| 117 | 121 | |
| 118 | 122 | # Generate the checksum page |
| 119 | 123 | # |
| 120 | 124 | set out [open fossil_download_checksums.html w] |
| 125 | +fconfigure $out -encoding utf-8 -translation lf | |
| 121 | 126 | puts $out {<html> |
| 122 | 127 | <title>Fossil Download Checksums</title> |
| 123 | 128 | <body> |
| 124 | 129 | <h1 align="center">Checksums For Fossil Downloads</h1> |
| 125 | 130 | <p>The following table shows the SHA1 checksums for the precompiled |
| @@ -129,7 +134,7 @@ | ||
| 129 | 134 | |
| 130 | 135 | foreach file [lsort [glob -nocomplain download/fossil-*.zip]] { |
| 131 | 136 | set sha1sum [lindex [exec sha1sum $file] 0] |
| 132 | 137 | puts $out "$sha1sum [file tail $file]" |
| 133 | 138 | } |
| 134 | -puts $out {</pre></body></html} | |
| 139 | +puts $out {</pre></body></html>} | |
| 135 | 140 | close $out |
| 136 | 141 |
| --- www/mkdownload.tcl | |
| +++ www/mkdownload.tcl | |
| @@ -3,10 +3,11 @@ | |
| 3 | # Run this script to build the "download.html" page. Also generate |
| 4 | # the fossil_download_checksums.html page. |
| 5 | # |
| 6 | # |
| 7 | set out [open download.html w] |
| 8 | puts $out \ |
| 9 | {<!DOCTYPE html><html> |
| 10 | <head> |
| 11 | <base href="http://www.fossil-scm.org/" /> |
| 12 | <title>Fossil: Timeline</title> |
| @@ -33,13 +34,15 @@ | |
| 33 | <a href='/fossil/reportlist'>Tickets</a> |
| 34 | </div> |
| 35 | <div class="content"> |
| 36 | <p> |
| 37 | |
| 38 | <center><font size=4> |
| 39 | <b>To install Fossil →</b> download the stand-alone executable |
| 40 | and put it on your $PATH. |
| 41 | </font><p><small> |
| 42 | RPMs available |
| 43 | <a href="http://download.opensuse.org/repositories/home:/rmax:/fossil/"> |
| 44 | here.</a> |
| 45 | Cryptographic checksums for download files are |
| @@ -65,11 +68,11 @@ | |
| 65 | set dt [string range $datetime 0 3]-[string range $datetime 4 5]- |
| 66 | append dt "[string range $datetime 6 7] " |
| 67 | append dt "[string range $datetime 8 9]:[string range $datetime 10 11]:" |
| 68 | append dt "[string range $datetime 12 13]" |
| 69 | set link [string map {{ } +} $dt] |
| 70 | set hr http://www.fossil-scm.org/fossil/timeline?c=$link&y=ci |
| 71 | puts $out "<tr><td colspan=6 align=left><hr>" |
| 72 | puts $out "<center><b><a href=\"$hr\">$dt</a></b></center>" |
| 73 | puts $out "</td></tr>" |
| 74 | |
| 75 | foreach {prefix suffix img desc} { |
| @@ -99,10 +102,11 @@ | |
| 99 | } |
| 100 | puts $out "</tr>" |
| 101 | if {[file exists download/releasenotes-$datetime.html]} { |
| 102 | puts $out "<tr><td colspan=6 align=left>" |
| 103 | set rn [open download/releasenotes-$datetime.html] |
| 104 | puts $out "[read $rn]" |
| 105 | close $rn |
| 106 | puts $out "</td></tr>" |
| 107 | } |
| 108 | } |
| @@ -116,10 +120,11 @@ | |
| 116 | close $out |
| 117 | |
| 118 | # Generate the checksum page |
| 119 | # |
| 120 | set out [open fossil_download_checksums.html w] |
| 121 | puts $out {<html> |
| 122 | <title>Fossil Download Checksums</title> |
| 123 | <body> |
| 124 | <h1 align="center">Checksums For Fossil Downloads</h1> |
| 125 | <p>The following table shows the SHA1 checksums for the precompiled |
| @@ -129,7 +134,7 @@ | |
| 129 | |
| 130 | foreach file [lsort [glob -nocomplain download/fossil-*.zip]] { |
| 131 | set sha1sum [lindex [exec sha1sum $file] 0] |
| 132 | puts $out "$sha1sum [file tail $file]" |
| 133 | } |
| 134 | puts $out {</pre></body></html} |
| 135 | close $out |
| 136 |
| --- www/mkdownload.tcl | |
| +++ www/mkdownload.tcl | |
| @@ -3,10 +3,11 @@ | |
| 3 | # Run this script to build the "download.html" page. Also generate |
| 4 | # the fossil_download_checksums.html page. |
| 5 | # |
| 6 | # |
| 7 | set out [open download.html w] |
| 8 | fconfigure $out -encoding utf-8 -translation lf |
| 9 | puts $out \ |
| 10 | {<!DOCTYPE html><html> |
| 11 | <head> |
| 12 | <base href="http://www.fossil-scm.org/" /> |
| 13 | <title>Fossil: Timeline</title> |
| @@ -33,13 +34,15 @@ | |
| 34 | <a href='/fossil/reportlist'>Tickets</a> |
| 35 | </div> |
| 36 | <div class="content"> |
| 37 | <p> |
| 38 | |
| 39 | <center><font size=4>} |
| 40 | puts $out \ |
| 41 | "<b>To install Fossil \u2192</b> download the stand-alone executable" |
| 42 | puts $out \ |
| 43 | {and put it on your $PATH. |
| 44 | </font><p><small> |
| 45 | RPMs available |
| 46 | <a href="http://download.opensuse.org/repositories/home:/rmax:/fossil/"> |
| 47 | here.</a> |
| 48 | Cryptographic checksums for download files are |
| @@ -65,11 +68,11 @@ | |
| 68 | set dt [string range $datetime 0 3]-[string range $datetime 4 5]- |
| 69 | append dt "[string range $datetime 6 7] " |
| 70 | append dt "[string range $datetime 8 9]:[string range $datetime 10 11]:" |
| 71 | append dt "[string range $datetime 12 13]" |
| 72 | set link [string map {{ } +} $dt] |
| 73 | set hr http://www.fossil-scm.org/fossil/timeline?c=$link&y=ci |
| 74 | puts $out "<tr><td colspan=6 align=left><hr>" |
| 75 | puts $out "<center><b><a href=\"$hr\">$dt</a></b></center>" |
| 76 | puts $out "</td></tr>" |
| 77 | |
| 78 | foreach {prefix suffix img desc} { |
| @@ -99,10 +102,11 @@ | |
| 102 | } |
| 103 | puts $out "</tr>" |
| 104 | if {[file exists download/releasenotes-$datetime.html]} { |
| 105 | puts $out "<tr><td colspan=6 align=left>" |
| 106 | set rn [open download/releasenotes-$datetime.html] |
| 107 | fconfigure $rn -encoding utf-8 |
| 108 | puts $out "[read $rn]" |
| 109 | close $rn |
| 110 | puts $out "</td></tr>" |
| 111 | } |
| 112 | } |
| @@ -116,10 +120,11 @@ | |
| 120 | close $out |
| 121 | |
| 122 | # Generate the checksum page |
| 123 | # |
| 124 | set out [open fossil_download_checksums.html w] |
| 125 | fconfigure $out -encoding utf-8 -translation lf |
| 126 | puts $out {<html> |
| 127 | <title>Fossil Download Checksums</title> |
| 128 | <body> |
| 129 | <h1 align="center">Checksums For Fossil Downloads</h1> |
| 130 | <p>The following table shows the SHA1 checksums for the precompiled |
| @@ -129,7 +134,7 @@ | |
| 134 | |
| 135 | foreach file [lsort [glob -nocomplain download/fossil-*.zip]] { |
| 136 | set sha1sum [lindex [exec sha1sum $file] 0] |
| 137 | puts $out "$sha1sum [file tail $file]" |
| 138 | } |
| 139 | puts $out {</pre></body></html>} |
| 140 | close $out |
| 141 |