diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2008-03-08 14:30:15 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2008-03-08 14:30:15 +0000 |
| commit | a420ba2fd04bb2adce1c693fc8d296f332bdd95c (patch) | |
| tree | 625f296d92a0f370b6fe16e8fd3d15aa4c4ba4d7 /lib/XXV/OUTPUT/Html.pm | |
| parent | 3d506c66cc8ec133730edddeaff4bd2ffd8a129b (diff) | |
| download | xxv-a420ba2fd04bb2adce1c693fc8d296f332bdd95c.tar.gz xxv-a420ba2fd04bb2adce1c693fc8d296f332bdd95c.tar.bz2 | |
Charset UTF8 Support. Run 'xxvd --utf8' to use encoding utf8 as data charset.
Diffstat (limited to 'lib/XXV/OUTPUT/Html.pm')
| -rw-r--r-- | lib/XXV/OUTPUT/Html.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/XXV/OUTPUT/Html.pm b/lib/XXV/OUTPUT/Html.pm index e28b87c..953604d 100644 --- a/lib/XXV/OUTPUT/Html.pm +++ b/lib/XXV/OUTPUT/Html.pm @@ -3,7 +3,6 @@ package XXV::OUTPUT::Html; use strict; use vars qw($AUTOLOAD); -use Locale::gettext; use Tools; use XXV::OUTPUT::HTML::WAIT; use File::Path; @@ -98,6 +97,9 @@ sub new { $self->{debug} = $attr{'-debug'} || 0; + $self->{charset} = $attr{'-charset'} + || 'ISO-8859-1'; + $self->{TYP} = 'HTML'; # Forward name of Server for CGI::server_software @@ -190,6 +192,7 @@ sub parseTemplateFile { pid => $$, debug => $self->{debug}, user => $user, + charset => $self->{charset}, # query the current locale locale => main::getGeneralConfig->{Language}, allow => sub{ @@ -369,7 +372,8 @@ sub header { return $self->{cgi}->header( -type => $typ, -status => "200 OK", - -expires => ($typ =~ 'text/html' || (defined $self->{nocache} && $self->{nocache})) ? "now" : "+7d", + -expires => ($typ =~ 'text/html' || (defined $self->{nocache} && $self->{nocache})) ? "now" : "+30d", + -charset => $self->{charset}, %{$arg}, ); } @@ -567,6 +571,7 @@ sub wait { my $waiter = XXV::OUTPUT::HTML::WAIT->new( -cgi => $self->{cgi}, -handle => $self->{handle}, + -charset => $self->{charset}, -callback => sub{ my ($min, $max, $cur, $steps, $nextmessage, $eta) = @_; my $out = $self->parseTemplate( |
