{ head("Lintian Reports by Maintainer") }
  <h1>Maintainers</h1>

  <p>
    Maintainers are listed sorted case-insensitively by package maintainer
    string.  This is an unsophisticated sort that doesn't take into
    account any national collating sequence, only Unicode strings, so
    maintainers whose names start with non-ASCII characters will sort at
    the end of this page.
  </p>

  <p>
    Jump to: { join (' ', map { qq(<a href="#$_">$_</a>) } 'A'..'Z') }
  </p>

{
    # Put headings before each new initial letter and add anchors, except
    # for non-ASCII initial characters.  For those, since we can't be
    # assured we'll get combining characters right, just accumulate them
    # under a heading of Other.
    my $letter = '';
    for my $maintainer (sort { lc ($a) cmp lc ($b) } keys %maintainers) {
        my ($url) = $maintainers{$maintainer};
        my $first = uc substr($maintainer, 0, 1);
        if ($first lt 'A' || $first gt 'Z') {
            $first = 'Other';
        }
        if ($first ne $letter) {
            unless ($letter) {
                $OUT .= "  </p>\n\n";
            }
            $letter = $first;
            if ($letter eq 'Other') {
                $OUT .= qq(  </p>\n\n  <h2>Other</h2>\n\n  <p>\n);
            } else {
                $OUT .= qq(  </p>\n\n  <h2 id="$letter"><a name="$letter">)
                    . $letter . "</a></h2>\n\n  <p>\n";
            }
        }
        $OUT .= qq(    <a href="maintainer/$url">$maintainer</a>)
            . qq{ (<a href="full/$url">full report</a>)<br />\n};
    }
}  </p>
{ foot() }
