JSP technology:
----------------------------------------
Public class ISOtoGb2312
{
Public static String convert (String str)
{
Try
{
Byte <> bytesStr = str. getBytes ("ISO-8859-1 ");
Return new String (bytesStr, "gb2312 ");
}
Catch (Exception ex)
{
Return str;
}
}
}
-------------------------------------------------------------------
<% @ Page contentType = "text/html; charset = GB2312" %>
<Html>
<Head>
<Title>
Input data
</Title>
</Head>
<Body bgcolor = "# ffffff">
<H1>
Enter data:
</H1>
<Hr>
<Form method = "POST" action = "insert. jsp">
<! -- Webbot bot = "SaveResults" U-File = "fpweb: // _ private/form_results.txt"
S-Format = "TEXT/CSV" S-Label-Fields = "TRUE" -->
<P> </p>
<P> </p>
<P>
<Font size = "5" color = "# 0000FF"> <B> Student ID:
</B> </font> <input type = "text" name = "id" size = "25">
<Font size = "5" color = "# 0000FF"> <B> sex </B> </font> <font size = "5" color = "# 0000FF"> <B>:
</B> </font> <input type = "text" name = "sex" size = "24"> </p>
<P>
<Font size = "5" color = "#000080"> <B> Last Name:
</B> </font> <input type = "text" name = "name" size = "25">