diff --git a/auth/auth.php b/auth/auth.php index 526af95..ab83fc7 100644 --- a/auth/auth.php +++ b/auth/auth.php @@ -8,6 +8,6 @@ session_set_cookie_params({{ site.lifetime }}); date_default_timezone_set("{{ site.timezone }}"); -header('Content-Type: text/plain'); +header('Content-Type: text/plain; charset=utf-8'); echo('OK'); diff --git a/bash/bash.sh b/bash/bash.sh index 31f4aa0..e0e5148 100755 --- a/bash/bash.sh +++ b/bash/bash.sh @@ -2,7 +2,7 @@ permalink: /cgi/bash/index.sh --- -echo "Content-type: text/plain" +echo "Content-type: text/plain; charset=utf-8" echo echo "Hello from bash!" echo diff --git a/challenge/challenge.php b/challenge/challenge.php index f8e4ee5..7c133e9 100644 --- a/challenge/challenge.php +++ b/challenge/challenge.php @@ -22,6 +22,6 @@ $_SESSION["two"] = rand(0, 9); $challenge = $_SESSION["one"] . " + " . $_SESSION["two"]; -header('Content-Type: text/plain'); +header('Content-Type: text/plain; charset=utf-8'); echo($challenge); ?> diff --git a/gitlog/gitlog.sh b/gitlog/gitlog.sh index 321170c..7777637 100755 --- a/gitlog/gitlog.sh +++ b/gitlog/gitlog.sh @@ -2,7 +2,7 @@ permalink: /cgi/gitlog/index.sh --- -echo "Content-type: text/plain" +echo "Content-type: text/plain; charset=utf-8" echo cat {{ site.document_root }}/gitlog.html diff --git a/ifconfig/ifconfig.php b/ifconfig/ifconfig.php index fa588f4..b42a041 100644 --- a/ifconfig/ifconfig.php +++ b/ifconfig/ifconfig.php @@ -13,6 +13,6 @@ if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['REMOTE_ADDR']; } -header('Content-Type: text/plain'); +header('Content-Type: text/plain; charset=utf-8'); echo($ip); ?> diff --git a/lua/lua.lua b/lua/lua.lua index 5ccde35..a97a770 100755 --- a/lua/lua.lua +++ b/lua/lua.lua @@ -2,7 +2,7 @@ permalink: /cgi/lua/index.lua --- -print("Content-type: text/plain") +print("Content-type: text/plain; charset=utf-8") print() print("Hello from Lua!") print() diff --git a/mail/mail.php b/mail/mail.php index e4498a8..fbcebc4 100644 --- a/mail/mail.php +++ b/mail/mail.php @@ -37,7 +37,7 @@ if ($_POST["sum"] == $sum) { unset($_SESSION["two"]); } -header('Content-Type: text/plain'); +header('Content-Type: text/plain; charset=utf-8'); if ($error=="") { echo("{{ site.mail_thank_you }}"); } else { diff --git a/perl/perl.pl b/perl/perl.pl index 1ed32ff..9714e91 100755 --- a/perl/perl.pl +++ b/perl/perl.pl @@ -6,13 +6,11 @@ use warnings; use strict; use POSIX qw(strftime); -my $date = strftime "%m/%d/%Y", localtime; - -print("Content-type: text/plain\n\n"); -print "Hello from Perl!\n\n"; -print $date; -print "\n\n"; - +print("Content-type: text/plain; charset=utf-8\n\n"); +print("Hello from Perl!\n\n"); +print("print(strftime('%m/%d/%Y %Z', localtime));\n"); +print(strftime("%m/%d/%Y %Z", localtime)); +print("\n\n"); print('my @i = (1..10); for(@i) { print("$_", "\n"); }'); print("\n"); diff --git a/php/php.php b/php/php.php index 4b35b01..b2521c3 100644 --- a/php/php.php +++ b/php/php.php @@ -4,7 +4,7 @@ permalink: /cgi/php/index.php diff --git a/uname/uname.php b/uname/uname.php index 497351b..2ab056f 100644 --- a/uname/uname.php +++ b/uname/uname.php @@ -9,6 +9,6 @@ $pos = strpos($uname, '-', 0); $res = substr($uname, 0, $pos); -header('Content-Type: text/plain'); +header('Content-Type: text/plain; charset=utf-8'); echo($res); ?> diff --git a/uptime/uptime.php b/uptime/uptime.php index bcb371d..c7beeeb 100644 --- a/uptime/uptime.php +++ b/uptime/uptime.php @@ -6,6 +6,6 @@ permalink: /cgi/uptime/ $uptime = shell_exec('uptime'); $version = shell_exec('uptime -V'); -header('Content-Type: text/plain'); +header('Content-Type: text/plain; charset=utf-8'); echo('Server ' . substr($version, 0, -1) . ': ' . $uptime); ?> diff --git a/whois/whois.php b/whois/whois.php index 085ce65..fff6f1e 100644 --- a/whois/whois.php +++ b/whois/whois.php @@ -24,6 +24,6 @@ $cmd = 'whois ' . $host; $whois = shell_exec($cmd); -header('Content-Type: text/plain'); +header('Content-Type: text/plain; charset=utf-8'); echo($whois); ?>