diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-07-05 13:19:18 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-07-05 13:19:18 +0800 |
commit | 1880cc2f73e5094ee203416552493f783ed24258 (patch) | |
tree | fe1647f60a5ae72a864a30ddc5b98eec6d4cf4ce /staticweb/index.pl | |
parent | 8a1cf189dd04d506d835a9d19e7cdc13c38929e2 (diff) | |
download | pttbbs-1880cc2f73e5094ee203416552493f783ed24258.tar pttbbs-1880cc2f73e5094ee203416552493f783ed24258.tar.gz pttbbs-1880cc2f73e5094ee203416552493f783ed24258.tar.bz2 pttbbs-1880cc2f73e5094ee203416552493f783ed24258.tar.lz pttbbs-1880cc2f73e5094ee203416552493f783ed24258.tar.xz pttbbs-1880cc2f73e5094ee203416552493f783ed24258.tar.zst pttbbs-1880cc2f73e5094ee203416552493f783ed24258.zip |
gb support
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@1022 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'staticweb/index.pl')
-rwxr-xr-x | staticweb/index.pl | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/staticweb/index.pl b/staticweb/index.pl index 2fcd7e30..71ad6117 100755 --- a/staticweb/index.pl +++ b/staticweb/index.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: index.pl,v 1.2 2003/07/04 05:59:05 in2 Exp $ +# $Id: index.pl,v 1.3 2003/07/05 05:19:18 in2 Exp $ use lib qw/./; use LocalVars; use CGI qw/:standard/; @@ -10,8 +10,18 @@ sub main { my($tmpl, %rh); - print redirect("/man.pl/$1/") - if( $ENV{REDIRECT_REQUEST_URI} =~ m|/\?(.*)| ); + if( param('gb') ){ + $rh{gb} = 1; + $rh{encoding} = 'gb2312'; + $rh{lang} = 'zh_CN'; + $rh{charset} = 'gb2312'; } + else{ + print redirect("/man.pl/$1/") + if( $ENV{REDIRECT_REQUEST_URI} =~ m|/\?(.*)| ); + $rh{encoding} = 'Big5'; + $rh{lang} = 'zh_TW'; + $rh{charset} = 'big5'; + } charset(''); print header(); |