X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=Util.pm;h=1688dc4d8078c85ff11a87f1267885225765a10d;hb=a1750087e17caa3ec1baeafc21b1a5229979df38;hp=76accc9af870e17fc85fb413ff2f1575250e0ea4;hpb=6695ab182b22c172628e12efcc0da5d29e74c7f0;p=mirror%2Fuserdir-ldap-cgi.git diff --git a/Util.pm b/Util.pm index 76accc9..1688dc4 100644 --- a/Util.pm +++ b/Util.pm @@ -171,10 +171,11 @@ sub FormatFingerPrint { $out .= " " if ($_ == 7); } } else { - foreach (0..int(length($in)/2)) { + foreach (0..int(length($in)/4)) { $out .= substr($in, $_*4, 4)." "; } } + chop $out; return $out; } @@ -256,7 +257,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; }