X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=Util.pm;h=98668c38e7f3bb7c92a636281a76aaa699679a18;hb=e8250d78d091445fbd422fed5d3ae9ab2516eada;hp=87ace99b36a35c5dc2eb81a7ee0a26c0f2a61062;hpb=a6e38208b7538082ebb16db9fb3d4093daa9702b;p=mirror%2Fuserdir-ldap-cgi.git diff --git a/Util.pm b/Util.pm index 87ace99..98668c3 100644 --- a/Util.pm +++ b/Util.pm @@ -256,7 +256,7 @@ sub LookupCountry { my $htmlhdrsent = 0; sub HTMLSendHeader { - print "Content-type: text/html\n\n" if (!$htmlhdrsent); + print "Content-type: text/html; charset=utf-8\n\n" if (!$htmlhdrsent); $htmlhdrsent = 1; } @@ -325,7 +325,8 @@ sub ReadConfigFile { if ((!/^\s*#/) && ($_ ne "")) { # Chop off any trailing comments s/#.*//; - ($attr, $setting) = split(/=/, $_, 2); + /([^=]+)=(.*)/; + ($attr, $setting) = ($1, $2); $setting =~ s/"//g; #" $setting =~ s/;$//; $attr =~ s/^\s+//; $attr =~ s/\s+$//;