Help: Cgi cannot display Chinese (written in shell)

My files are stored in the test.cgi, /usr/local/apache2/cgi-bin/, as follows:


echo Content-type: text/html; charset=gb2312


echo "<HTML><PRE>"

echo "<head>"

echo "<title>sophia test file</title>"

echo "<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />"

echo "</head>"

echo "This is a test CGI"

echo "</PRE></HTML>"

But the use of https://localhost/cgi-bin/test.cgi access, Chinese cannot display, display garbled,

Please master to help out where the error

Thank you very much

Started by Leo at November 18, 2016 - 7:39 PM

You try to have a look at the webpage there right -> code; -> simplified Chinese(GB2312)

Posted by Hyman at November 27, 2016 - 8:31 PM