Commits

Anonymous committed b57da48

Convert ASCII double-quotes to stylised Unicode quotes.

This involved many changes and hacks.

Comments (0)

Files changed (10)

 package MyNavData;
 
+use strict;
+use warnings;
+
+use utf8;
+
 my $hosts =
 {
     t2 => 
                     [
                         {
                             text => "Factoids",
-                            title => ""Facts" about Chuck Norris and other things",
+                            title => "“Facts” about Chuck Norris and other things",
                             url => "humour/bits/facts/",
                         },
                     ],
                 {
                     text => "Back to my Homepage",
                     url => "art/bk2hp/",
-                    title => "A Back to my Homepage logo not unlike the one from the movie "Back to the Future"",
+                    title => "A Back to my Homepage logo not unlike the one from the movie Back to the Future",
                 },
                 {
                     text => "Linux Banner",
                 {
                     text => "Made with Latemp",
                     url => "art/made-with-latemp/",
-                    title => ""Made with Latemp" Button",
+                    title => "Made with Latemp Button",
                 },
                 {
                     text => "HHFG Background",
                     url => "art/hhfg-background/",
-                    title => "Background Image for the "Human Hacking Field Guide" Story",
+                    title => "Background Image for the Human Hacking Field Guide Story",
                 },
                 {
                     text => "Better SCM Logo",
                     url => "art/better-scm/",
-                    title => "Logo for the  "Better SCM" Site",
+                    title => "Logo for the Better SCM Site",
                 },
                 {
                     text => "Slogans' Designs",

lib/Shlomif/Homepage/SectionMenu/Sects/Essays.pm

 use strict;
 use warnings;
 
+use utf8;
 use MyNavData;
 
 my $essays_tree_contents =
                         {
                             text => "Perl & Newcomers",
                             url => "philosophy/perl-newcomers/",
-                            title => ""Usability" of the Perl Online World for Newcomers",
+                            title => "Usability of the Perl Online World for Newcomers",
                         },
                         {
                             text => "The Joy of Perl",
                             title => "Coverage of the Current Choice of Document Formats",
                         },
                         {
-                            text => "The \"Use qmail instead\" Syndrome",
+                            text => "The Use qmail instead Syndrome",
                             url => "philosophy/computers/web/use-qmail-instead/",
                         },
                         {
                     ],
                 },
                 {
-                    text => "Define \"Zionism\"!",
+                    text => "Define Zionism!",
                     url => "philosophy/politics/define-zionism/",
-                    title => ("What is "Zionism" really? What " . 
+                    title => ("What is Zionism really? What " . 
                         "does anti-Israel, anti-Zionist, etc. mean?"),
                     subs =>
                     [
             subs =>
             [
                 {
-                    text => "James Carr - "Completely Overrated"",
+                    text => "James Carr - Completely Overrated",
                     url => "philosophy/by-others/james-carr--completely-overrated.html",
                     title => "James Carr about the anti-Muslim Cartoons",
                 },
                 {
-                    text => "Hebrew Translation of "Ten Reasons for Web Standards"",
+                    text => "Hebrew Translation of Ten Reasons for Web Standards",
                     url => "philosophy/by-others/mashhoor--10-reasons--hebrew.html",
                     title => "10 Reasons for Companies to Consider Web Standards - Hebrew Translation",
                 },

lib/Shlomif/Homepage/SectionMenu/Sects/Humour.pm

 use strict;
 use warnings;
 
+use utf8;
+
 use MyNavData;
 
 my $humour_tree_contents =
 {
     host => "t2",
-    text => "Shlomi Fish's Stories and Aphorisms",
-    title => "Shlomi Fish's Stories and Aphorisms",
+    text => "Shlomi Fish’s Stories and Aphorisms",
+    title => "Shlomi Fish’s Stories and Aphorisms",
     show_always => 1,
     subs =>
     [
                         {
                             text => "Text in Hebrew",
                             url => "humour/TheEnemy/The-Enemy-rev6.html",
-                            title => "Text of "The Enemy" In Hebrew",
+                            title => "Text of The Enemy In Hebrew",
                         },
                         {
                             text => "Text in English",
                             url => "humour/TheEnemy/The-Enemy-English-rev6.html",
-                            title => "Text of "The Enemy" In English",
+                            title => "Text of The Enemy In English",
                         },
                     ],
                 },
                 {
                     text => "TOW The Fountainhead",
                     url => "humour/TOWTF/",
-                    title => "A Parody on "The Fountainhead"",
+                    title => "A Parody on The Fountainhead” by Ayn Rand",
                     subs =>
                     [
                         {
                             title => "Ongoing Text of the Screenplay",
                         },
                         {
-                            text => "\"Buy the Fish\" Song in Hebrew",
+                            text => "Buy the Fish Song in Hebrew",
                             url => "humour/humanity/buy-the-fish-in-hebrew.html",
                         },
                     ],
                 {
                     text => "Human Hacking Field Guide",
                     url => "humour/human-hacking/",
-                    title => "Story about Teenage Computer Enthusiasts in 2005's Los Angeles",
+                    title => "Story about Teenage Computer Enthusiasts in 2005s Los Angeles",
                     subs =>
                     [
                         {
                     ],
                 },
                 {
-                    text => "The Blue Rabbit's Log",
+                    text => "The Blue Rabbits Log",
                     url => "humour/Blue-Rabbit-Log/",
                     title => "Movies that Parody Role-Playing Games",
                     subs =>
                         {
                             text => "friends",
                             url => "humour/fortunes/friends.html",
-                            title => "Excerpts from the T.V. Show "Friends^quot;",
+                            title => "Excerpts from the T.V. Show Friends",
                         },
                         {
                             text => "joel-on-software",
                             url => "humour/fortunes/joel-on-software.html",
-                            title => "Quotes from "Joel on Software"",
+                            title => "Quotes from the site “Joel on Software",
                         },
                         {
                             text => "nyh-sigs",
                             url => "humour/fortunes/nyh-sigs.html",
-                            title => "Nadav Har'El's Signatures",
+                            title => "Nadav HarEls Signatures",
                         },
                         {
                             text => "osp_rules",
                     url => "humour/bits/RMS-Lint/",
                 },
                 {
-                    text => "Cracka's Paradise",
+                    text => "Crackas Paradise",
                     url => "humour/bits/Crackas-Paradise/",
                 },
                 {
                     title => "Richard Stallman Switches to Basic",
                 },
                 {
-                    text => "Darien - Everybody's Free (to Ping Timeout)",
+                    text => "Darien - Everybodys Free (to Ping Timeout)",
                     url => "humour/by-others/darien--everybody-is-free.html",
-                    title => "The IRC Version of "Everybody's Free to Wear Sunscreen"",
+                    title => "The IRC Version of Everybodys Free to Wear Sunscreen",
                 },
                 {
                     text => "Technion Bit #1",
                     title => "A bit I found at the Technion",
                 },
                 {
-                    text => "Hitchhiker's Guide to Star Trek TNG",
+                    text => "Hitchhikers Guide to Star Trek TNG",
                     url => "humour/by-others/hitchhiker-guide-to-star-trek-tng.html",
                     title => "A Cross of the Douglas Adams Book and the T.V. Series",
                     subs =>
                     title => "A mirror of a hilarious parodical site that went offline",
                 },
                 {
-                    text => "Oded C.'s Stories",
+                    text => "Oded C.s Stories",
                     url => "humour/by-others/oded-c/",
                     title => "Humorous stories by Oded C. in Hebrew",
                 },

lib/Shlomif/Homepage/SectionMenu/Sects/Lectures.pm

 use strict;
 use warnings;
 
+use utf8;
+
 use MyNavData;
 
 my $essays_tree_contents =
                 {
                     text => "CatB",
                     url => "lecture/CatB/",
-                    title => "Presentation about "The Cathedral and the Bazaar"",
+                    title => "Presentation about The Cathedral and the Bazaar” series by Eric Raymond",
                 },
                 {
                     text => "The Joel Test",

lib/Shlomif/Homepage/SectionMenu/Sects/Puzzles.pm

 use strict;
 use warnings;
 
+use utf8;
+
 use MyNavData;
 
 my $puzzles_tree_contents =
             subs =>
             [
                 {
-                    text => ""Lotg" Code",
+                    text => "The “Lotg” Code",
                     url => "puzzles/cs/lotg/",
+                    title => "A minimalistic programming language that I came up with",
                 },
             ],
         },

lib/Shlomif/Homepage/SectionMenu/Sects/Software.pm

 use strict;
 use warnings;
 
+use utf8;
+
 use MyNavData;
 
 my $software_tree_contents =
                     title => "Dump the Meta-Data of Directory Structures",
                 },
                 {
-                    text => "\"Black Hole\" Solitaire Solver",
+                    text => "Black Hole Solitaire Solver",
                     url => "open-source/projects/black-hole-solitaire-solver/",
                     title => "Solve layouts of the patience card game 'Black Hole'",
                 },
                             title => "Spark - Pre-Birth of a Modern Lisp",
                         },
                         {
-                            text => "Old Document ( \"Park\" )",
+                            text => "Old Document ( Park )",
                             url => "open-source/projects/Park-Lisp/",
                             title => "Park - a Dialect of the Lisp Programming Language inspired by Arc",
                         },
                 {
                     text => "PHP Sucks",
                     url => "open-source/anti/php/",
-                    title => ""PHP Sucks" - originally by czth",
+                    title => "PHP Sucks - originally by czth",
                 },
                 {
                     text => "GNU Autohell",

lib/local-defs.wml

 <set-var latemp_with_html_head_stylesheets="<latemp_mynot "$(PRINTABLE)" />" />
 <define-tag latemp_get_breadcrumbs_trail_unconditionally>
 <:{
+    use utf8;
+
     init_section_nav_menu();
     my $total_leading_path = $section_nav_menu->total_leading_path(
         {
             $component->label() . "</a>";
     };
 
-    print join(" → ",
-        (map
-        { $render_leading_path_component->($_) }
-        @$total_leading_path
-        ));
+    sub _wrap_as_utf8 {
+        my ($cb) = @_;
+
+        binmode STDOUT, ":utf8";
+        
+        $cb->();
+
+        binmode STDOUT, ":raw";
+    }
+
+    {
+        _wrap_as_utf8( sub {
+            print join(" → ",
+                (map
+                 { $render_leading_path_component->($_) }
+                 @$total_leading_path
+                ));
+        });
+    }
 }:>
 </define-tag>
 
+<define-tag latemp_get_nav_menu_html>
+<:{ 
+
+{
+    _wrap_as_utf8( sub {
+        print join("\n", @$nav_html); 
+    });
+}
+
+}:>
+</define-tag>
+
+
+<define-tag latemp_get_html_head_nav_links>
+<:{
+my @keys = (sort { $a cmp $b } keys(%$nav_links_obj));
+foreach my $key (@keys)
+{
+    my $val = $nav_links_obj->{$key};
+    my $url = CGI::escapeHTML($val->direct_url());
+    my $title = $val->title();
+    _wrap_as_utf8( sub {
+        print "<link rel=\"$key\" href=\"$url\" title=\"$title\" />\n";
+    });
+}
+}:>
+</define-tag>
+
+
+<define-tag latemp_get_html_body_nav_links_helper>
+<preserve with_accesskey />
+<set-var %attributes />
+<:{
+    my $with_accesskey = "<get-var with_accesskey />";
+    my @params;
+    if ($with_accesskey ne "")
+    {
+        push @params, ('with_accesskey' => $with_accesskey);
+    }
+    _wrap_as_utf8(sub {
+        print $nav_links_renderer->get_total_html(@params);
+    });
+}:>
+<restore with_accesskey />
+</define-tag>

lib/rest-of-template.wml

 <:{
     use MySectNavData;
 
+    BEGIN
+    {
+        # binmode STDOUT, ":encoding(utf-8)";
+    }
 
     use vars (qw($section_nav_menu));
 
     }
 
     init_section_nav_menu();
-    print $section_nav_menu->get_html();
+    {
+        _wrap_as_utf8 (sub {
+            print $section_nav_menu->get_html();
+        });
+    }
 }:>
 </section_nav_menu_elements>
 <define-tag page_extra_head_elements endtag="required" whitespace="delete">

t2/DeCSS/JavaScript/index.html

 <h1>DeCSS for JavaScript Embedding HTML</h1>
 
 <p>
-On this page: <a href="decss_js.html">"decss_js.html"</a> you can find an
-HTML file that powers the DeCSS for JavaScript source code. Note that its
+On this page: <a href="decss_js.html"><tt>decss_js.html</tt></a>, you can find 
+an HTML file that powers the DeCSS for JavaScript source code. Note that its
 decryption backend is _not_ DeCSS.
 </p>
 
 
 <p>
 To activate the HTML with the real DeCSS backend place both it and the 
-<b>real</b> "decss_js.js" file in the same directory, assuming you know what
-you are doing. I am not responsible for the results.
+<b>real</b> <tt>decss_js.js</tt> file in the same directory, assuming you know
+what you are doing. I am not responsible for the results.
 </p>
 
 <p>

t2/site-map/index.html.wml

 
 <div class="sitemap">
 <:{
+_wrap_as_utf8 (sub {
 print (map { "$_\n" } @{$nav_bar->gen_site_map()});
+});
 }:>
 </div>