Changeset 915

Show
Ignore:
Timestamp:
03/16/02 21:48:00 (11 years ago)
Author:
bradfitz
Message:

send charset=utf-8 from users page by default when $LJ::UNICODE is set.
and when sending RSS (though that is alll to be redone anyway)

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/ljviews.pl

    r911 r915  
    12951295    }); 
    12961296 
    1297     $opts->{'contenttype'} = 'text/xml'; 
     1297    $opts->{'contenttype'} = 'text/xml; charset=utf-8'; 
    12981298 
    12991299    my $logtext = LJ::get_logtext($dbs, @itemids); 
  • trunk/htdocs/users

    r687 r915  
    179179 
    180180    my $status = $opts->{'status'} || "200 OK"; 
    181     my $contenttype = $opts->{'contenttype'} || "text/html"; 
     181    unless ($opts->{'contenttype'}) { 
     182        $opts->{'contenttype'} = "text/html"; 
     183        if ($LJ::UNICODE) { 
     184            $opts->{'contenttype'} .= "; charset=utf-8"; 
     185        } 
     186    } 
    182187 
    183188    if ($opts->{'badargs'})  
     
    211216        print "\n"; 
    212217    } else { 
    213         print "Content-type: $contenttype\n"; 
     218        print "Content-type: $opts->{'contenttype'}\n"; 
    214219        print "Cache-Control: private, proxy-revalidate\n"; 
    215220        print "Vary: Accept-Encoding, Cookie\n";